Skip to content

This is a starter template for Node.js, Express and TypeScript with CommonJS Modules.

Notifications You must be signed in to change notification settings

mhm13dev/node-express-ts-starter

Repository files navigation

Node.js, Express and TypeScript with CommonJS Modules Starter Template

This is a starter template for Node.js, Express and TypeScript with CommonJS Modules.

Getting Started

Prerequisites

Installing

$ 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 install

Running

Development:
$ pnpm start:dev

Production:
$ pnpm build
$ pnpm start

Environment Variables

You can use multiple environment variables files for different environments. Order of precedence is:

  1. .env.development.local, .env.production.local, .env.test.local (local overrides for environment specific variables)
  2. .env.development, .env.production, .env.test (environment specific variables)
  3. .env.local (local overrides)
  4. .env (default)

The default value of NODE_ENV for different scripts is:

  • start:dev: NODE_ENV=development
  • build: NODE_ENV=production
  • start: NODE_ENV=production

Built With

Authors

About

This is a starter template for Node.js, Express and TypeScript with CommonJS Modules.

Resources

Stars

Watchers

Forks