Catalog npm
PACKAGE EXPLORERView in registry

@0x4447/tomato

npm

๐Ÿ… Our personal default template for a ExpressJS projects

0x4447cliexpressgeneratortemplate
Versions collected19
Direct dependencies4From release 1.18.18
Last observed20 Oct, 22:37 UTC

README

Current package documentation

๐Ÿ… Tomato

Tomato is our take on the express-generator CLI that comes with ExpressJS. We created the project because we were spending too much time on bringing the default ExpressJS template up to speed, especially when we had to constantly spin up new micro-services.

One nice feature of this project is that it's simple for you to customize. If you have your own style, just clone this repo and edit the source folder to suit your needs.

How to install

] sudo npm install -g @0x4447/tomato

How to use

] tomato -d PATH_TO_FOLDER

Where to get help

] tomato -h

What to expect

There are two templates in the source folder, one for building a Website in ExpressJS, and another for building an API. In this case, the API template is a stripped-down version of the Website folder - with some minor changes. Below you'll find the list of all the shared features, but not limited to features they don't share in common.

Shared key features

  • Our preferred personal commenting style
  • A simplified and thoroughly explained server file that immediately demonstrates what each line of code does
  • Clustering used by default
  • Redesigned handling and display of errors
  • Knex used by default to talk with the database
  • Code to start the server in workers folder since it's a worker and we always end up with more than the server
  • Everything organized in the way we like it :)

Website

  • Redirect to HTTPS in production
  • Compression used by default when sending requests
  • Hogan used by default for templating (nice and simple)
  • Favicon done right: Make five icons with Real Favicon Generator
  • Basic Open Graph support
  • Twitter Cards support

API

  • Throws error if there is no HTTPS in production
  • Removes the ETag from the header response
  • Removes the Data entry in the header response
  • Built-in check for an API Key

The entire flow to get the project up and running follows:

] sudo npm -g install @0x4447/tomato

Once you have this npm package installed globally, you can use it anywhere. Go to a folder in which you'd like to create a new project, then:

] tomato -d PATH_TO_FOLDER

Select the option that best suits your needs, then go into the directory you just created and type:

] npm install

Next, create a .env file to load your environment variables into memory - thanks to foreman. Or you can install another of our tool, env-auto in this manner:

] npm install cucumber -g

In your project's root folder, type:

] cucumber -s PATH_TO_FOLDER

This automatically creates the .env file created from the app.json file. The last step is to start the whole thing with:

] npm start

WARNING

This tool will override, destroy, kill, and crash everything in its path. You've been warned! ;)

Fork it

We designed this project in such a simple way that you can make it your own. Once forked, just change the content of the source folder, and you'll have your own easy-to-use template up and running whenever you need it.

The End

If you enjoyed this project, please consider giving it a ๐ŸŒŸ. And check out our 0x4447 GitHub account, which contains additional resources you might find useful or interesting.

Sponsor ๐ŸŽŠ

This project is brought to you by 0x4447 LLC, a software company specializing in building custom solutions on top of AWS. Follow this link to learn more: https://0x4447.com. Alternatively, send an email to hello@0x4447.email.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 19

Collected releases
VersionPublishedDirect dependenciesOpen version
1.18.18Registry latest8 Feb 20194
1.18.171 Jul 20184
1.18.161 Jul 20184
1.18.1524 Jun 20184
1.18.1423 Jun 20184
1.18.1323 Jun 20184
1.18.1222 Jun 20184
1.18.1121 Jun 20183
1.18.1021 Jun 20183
1.18.921 Jun 20183
1.18.821 Jun 20183
1.18.718 Jun 20183
1.18.65 Feb 20183
1.18.529 Jan 20183
1.18.429 Jan 20183
1.18.329 Jan 20183
1.18.213 Jan 20183
1.18.112 Jan 20182
1.18.012 Jan 20182

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
0x4447/0x4447-node-cli-tomato

Shared repository data ยท GitHub

License detected in repository
Not collected

Repository

PENDING
0x4447/0x4447-cli-node-tomato

Shared repository data ยท GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:37 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:5c1567468592eaed2560ad235e33889ea593f0aa624da4714b5d5b70eae736b7