Template project for a NodeJS service using TypeScript and Yarn. Use this as a starting point when creating new services.
-
master
: The base template, an empty NodeJS project with typescript build support -
nestjs
: Adds basic NestJS support
nvm
: Node Version Manager
-
nvm install
: Ensure the current verison of node is installed -
nvm use
: Activate the correct version of node -
npm install -g yarn
: Make sure yarn is installed
-
To configure node within the current shell:
nvm use
-
Install all runtime and development dependencies:
yarn install
-
Install only runtime dependencies:
yarn install --production
-
Add a new development dependency:
yarn add --dev <package>
-
Add a new runtime dependency:
yarn add <package>
-
Start development version:
yarn dev
-
Start production version (after building):
yarn start
Scripts are located in /scripts
and run via yarn script
.
-
build [full]
: Build the production version -
clean
: Delete build artifacts -
format <check | write>
: Verify or correct code formatting -
uninstall
: Delete downloaded dependencies (the opposite ofyarn install
)