Skip to content

This is a starter project for Node.js, Express and TypeScript.

Notifications You must be signed in to change notification settings

mhm13dev/node-express-ts-starter

Repository files navigation

Node.js, Express and TypeScript Starter Project

This is a starter project for Node.js, Express and TypeScript.

Getting Started

Prerequisites

  • Node.js (>= 20.12.0 <21.0.0)
  • Yarn (>= 1.22.22 <2.0.0)

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

Running

Development:
$ yarn start:dev

Production:
$ yarn build
$ yarn 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 project for Node.js, Express and TypeScript.

Resources

Stars

Watchers

Forks