To use this boilerplate, either clone it using git clone
, download it as ZIP or use GitHub Repository Import.
The following are configured:
- TypeScript
- Yarn
- Jest
- ESLINT
- Custom base path starting from
src/
. Example:import { hi } from 'models/testfile'
- Auto reload with
nodemon
and building with webpack - Prettier
And the following scripts:
build
- compiles source code into JS, outputs todist
test
- runs tests using Jeststart
- compiles the server, then usesnode
to run it from the compiled filesdev
- runs the server in dev mode, and automatically refresheslint
- runs ESLint
Using some libraries you could be forced to migrate your tsconfig.json
from commonJS to ESM. In example, chalk.
We can solve this problem in two ways:
- Downgrade specific library to be compatible with commonJS (use require internally)
- Using
tsconfig-paths-webpack-plugin