If you need typescript starter pack for node.js development. You are on right place. Repository contains only must have (for our point of view) dependencies to build. The repository solves 4 main parts
- Run in development mode - we use
ts-node
as a typescript execution environment,dot-env
library for setting up environment variables - Run tests there is a predefined way how to run tests with
jest
- Build application - for build is used classic way of
tsc
- Run in production mode - run compiled code
jest
for testing and code coverageprettier
,tslint
for code style checkingts-node-dev
for running project in development mode (automatic restart on change)pino-pretty
for nice console output
yarn
install dependenciesyarn build
build applicationyarn dev
start development modeyarn test
run testsyarn eslint:fix
apply prettier rules for projectyarn start
start compiled application
yarn test:cover
check code coverage in projectyarn eslint:check
checking code style policies by prettier and eslint
Where can env variables can be set?
- For setting of env variables is used dotenv package, there are .env files in
./config
folder