NodeJS API Boilerplate
NodeJS API back-end with the following tools already setup
- Typescript compiler i.e.
tsc
- Absolute imports with
module-alias
eslint
for static analysis and lintingvitest
for testing- Some basic
package.json
scripts
Setup
$ npm i --save-dev
Run in Development Mode
$ npm run dev
Run in Production Mode
$ npm run build
$ npm run start
Note: The NODE_ENV
environment variable will be set to production
when running the app in production mode.
Linting & Formatting code
$ npm run check
Running Tests with Vitest
$ npm test
Generate JWT secret
$ npm run gen:secret
Run database migrations
$ npm run db:migrate
Run database seeders
$ npm run db:seed