Based on https://github.com/vmasto/express-babel Express.js with Babel Boilerplate
- Express.js as the web framework.
- ES2017+ support with Babel.
- Automatic polyfill requires based on environment with babel-preset-env.
- Linting with ESLint.
- Testing with Jest.
yarnThen you can begin development:
yarn run devThis will launch a nodemon process for automatic server restarts when your code changes.
Testing is powered by Jest. This project also uses supertest for demonstrating a simple routing smoke test suite. Feel free to remove supertest entirely if you don't wish to use it.
Start the test runner in watch mode with:
yarn testYou can also generate coverage with:
yarn test -- --coverageLinting is set up using ESLint. It uses ESLint's default eslint:recommended rules. Feel free to use your own rules and/or extend another popular linting config (e.g. airbnb's or standard).
Begin linting in watch mode with:
yarn run lintThe project uses dotenv for setting environmental variables during development. Simply copy .env.example, rename it to .env and add your env vars as you see fit.
It is strongly recommended never to check in your .env file to version control. It should only include environment-specific values such as database passwords or API keys used in development. Your production env variables should be different and be set differently depending on your hosting solution. dotenv is only for development.
Deployment is specific to hosting platform/provider but generally:
yarn run buildwill compile your src into /dist, and
yarn startwill run build (via the prestart hook) and start the compiled application from the /dist folder.
MIT License. See the LICENSE file.