Catalog npm
Back to packageRELEASE DETAILS

1.18.8

npm

@0x4447/tomato

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

0x4447cliexpressgeneratortemplate
Published21 Jun 2018
Direct dependencies3
Transitive dependenciesNot calculated

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.

Declared dependencies 3

Native requirements
3 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
4.1.0runtime
ncp
Environment
{
  "local_name": "ncp",
  "alias": false,
  "peer_metadata": null
}
2.0.0runtime
terminal-kit
Environment
{
  "local_name": "terminal-kit",
  "alias": false,
  "peer_metadata": null
}
1.11.1runtime

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-ljDlcstLvYF2+BmoWKF9LbTJSwk5LL6X+2MFi7qAyuzVGom7u3zpZcTI3M7DvGbrcP/jmlbKLHTc1L8q+vCMpg==",
  "shasum": "f3dc5048691fdc71b06fdd1c0ab05533fc538087",
  "tarball": "https://registry.npmjs.org/@0x4447/tomato/-/tomato-1.18.8.tgz",
  "fileCount": 57,
  "unpackedSize": 930895,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLBiHCRA9TVsSAnZWagAAnE4P/1F1uMoNXhK+P7nyBk79\n9B3eARPS+THOqyoAQ/1R92P8wDsPIpDUgvTLLBOH3QSfQbidLgz8+nJzhpef\nVsoZ7S+uvs/vjOjHxr19weruoYyhJOuqmKpf7qwNTe11+1LnCr9stwDCRO/g\nQmI46vavrz/oCsOVnbYs9yfunH1qUMQGlP1CTEkRHq+UBwJdxNgRO4Di91fV\nEKyuIdk+zkNQ+lj1h/bS0m1mQomwaGX4Zn4JV3+OhUlSyzJqW0Vri5RZnBiI\nx8ztn9IEHJSLN/udpSj9KPJe4DegiwoDrnY1Jj7dPiJtGrvekLIVomYojeFL\n8DzYTgsDVJ7gVwYn4xhABh98ksgf4brV+073CJFEE2tLxt3xNFzdErHPmGjq\n1SLCYnqWzjmjGJBBV4zdlxbrbLkDtC25m7u7aAYPiLJ1pKRrata0+O20dta1\nL5sp1tOEP14ICrf21CXwYTzQMGVGWxw+yqUhYt7ygO8OeJDP5iKPlIm4oz41\nzaMnMWi+wkN9ITx4DfRMnVptDcEIYUcKC2GwEj3prZ+6BuKsyVp07RkPHvsJ\ngzbXRP8BOQmjzIj7cmotl9NiJrlHF4wRr+9W5GtyznOB+zll7Wh+LgZTGW6f\nvG7Yv/vThRz8wbVRPUNWW45TGXIPQ71gwO35vRITAA3vxrke1TWif8rDi69o\nLYip\r\n=oUda\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEQCIFCYD3SzD9kLK5aNc1MJwYFTy0ZCbrGC0hcQcbEJp/9wAiBdI8nZav69DXhkAKjkzT1yAwRDvkUUjHIYM7fS6+4hwA=="
    }
  ]
}

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_version:7def57d18f671fffbfc84df2991a5e93858d583d2d06deb3afcb761aaa90129b

Other collected versions

1.18.188 Feb1.18.171 Jul1.18.161 Jul1.18.1524 Jun1.18.1423 Jun1.18.1323 JunView all collected versions β†’