Skip to content

Boilerplate for Node.JS API using Typescript and Express.js using dependency injection

Notifications You must be signed in to change notification settings

subhadipghs/node-express-typescript-boilerplate

Repository files navigation

Logo

Node Express Typescript Boilerplate

Scalable dependency injection based express and typescript boilterplate for creating Restful APIs


Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. NPM Scripts
  4. Git Branching Guides
  5. Contributing

Tech stack


Getting Started

  1. Make sure Node(>=v14.18.0) is installed on your system. If you don't have Node installed on your system then download the the Node installer from the above website.

  2. Install Yarn package manager.

Installation

  1. Clone the repository

    https://github.com/subhadipghs/node-express-typescript-boilerplate sample-app
  2. Install NPM packages

    yarn install
  3. Create a .env file in the root directory of the project and set the following environment variables. (Checkout .env.example for example of .env file)

    POSTGRES_USERNAME=
    POSTGRES_PASSWORD=
    POSGRES_DB=
    POSTGRES_HOST=
    POSTGRES_PORT=
    NODE_ENV=
    PORT=
  4. Run the app in development mode

    npm run watch
  5. Open terminal and paste the command below

    curl --request GET --url http://localhost:3000/ping

(back to top)