/data-broker

Primary LanguageJavaScriptMIT LicenseMIT

Heroku Express.js with Babel Boilerplate

Dependencies Status Dev Dependencies Status NSP Status

Slightly more opinionated and less agnostic version of Vassilis Mastorostergios' Express.js with Babel Boilerplate.

Original Features:

Added Features:

  • Node clustering concurrency (https://devcenter.heroku.com/articles/node-concurrency)
  • Updated engines and all dependencies (current as of July 1, 2018)
  • Logging with Winston (custom format, rotating logs to disk)
  • Security with Helmet
  • NPM dev script clean builds before restarting (so changes take effect)
  • Optional environment variables for server port, minimum log level, max log size and web concurrency

Opinionated Features:

Getting Started

# Clone the project
git clone git@github.com:daniel-lanciana/heroku-express-babel.git
cd heroku-express-babel

# Make it your own
rm -rf .git && git init && npm init

# Install dependencies
yarn

# Build and start local server (server will restart when code changes)
yarn run dev

# Run tests (Jest runner and basic assertions, supertest API testing)
yarn test

# Run tests with coverage
yarn test --coverage

# Static code analysis (i.e. linting) using ESLint
yarn run lint

Environmental Variables (Devlopment)

Rename .env.example to .env and add your environment variables. Powered by dotenv.

Add Heroku environment variables via the web console.

Deploy to Heroku

Either through the command line or create a Heroku app and connect to GitHub and deploy from the web console.

License

MIT License. See the LICENSE file.