This is a starter template for Node.js, Express and TypeScript with CommonJS Modules.
$ git clone https://github.com/mhm13dev/node-express-ts-starter.git --depth 1 <project-name>
$ cd <project-name>
$ rm -rf .git
$ git init
$ git add .
$ git commit -m "Initial commit"
$ pnpm installDevelopment:
$ pnpm start:dev
Production:
$ pnpm build
$ pnpm startYou can use multiple environment variables files for different environments. Order of precedence is:
.env.development.local,.env.production.local,.env.test.local(local overrides for environment specific variables).env.development,.env.production,.env.test(environment specific variables).env.local(local overrides).env(default)
The default value of NODE_ENV for different scripts is:
start:dev:NODE_ENV=developmentbuild:NODE_ENV=productionstart:NODE_ENV=production