A boilerplate for Express backend server in TypeScript. These instructions sets up the project on your local machine for development and testing.
You need node@^12 and npm@^6 installed on your system.
A step by step series of examples that tell you how to get a development environment running.
Install all project dependency with npm:
npm installThen you need to create a .env file with some required variables:
PORT=3000
NODE_ENV=developmentThe default value of PORT is set to 3000.
Now, you can start the application with the predefined scripts:
npm run dev
# OR
npm run startThe unit tests can also be run from a predefined script:
npm run testThere are pre-commit hooks to run eslint and prettier on staged files.
There is a pre-push hook that runs the unit tests.
The configuration for this is present inside the package.json file.
Inspiration from express-boilerplate.