Skip to content

morshedmasud/express-mongoDB-typescript-restAPI-starter

Repository files navigation

Express, Mongodb, Typescript RestAPI Service

Technology used

  1. Node
  2. Express JS
  3. Typescript
  4. MongoDB

Features

  • User SignIn/SignUp
  • Basic Authentication with jwt-http
  • OAuth 2.0 (Authentication with Access & Refresh Token)
  • Data Validation with JOI
  • Unit Testing
  • Email Verification
  • Docker Configuration
  • Swagger Documentation

Setup in your local machine

  1. Clone project
git clone [email protected]:morshedmasud/express-mongoDB-typescript-restAPI-starter.git
  1. Go to project root path and install all dependency with
yarn install
  1. Don't forget to create .env file as like .env.example and put necessary values like DB Info, Email Info
cp .env.example .env
  1. Start your mongodb service.
  2. Run the project
// development server
yarn run dev

// build project
yarn build

// production server
yarn run start
  1. Run With Docker
// build
sudo docker-compose build

// run
sudo docker-compose up
  1. Testing
// run all unit-test
yarn run test:unit

// run individual unit-test file
yarn run test:unit src/services/__tests__/auth.ts

Open the following url for view swagger documentation

About

Rest API starter with express, mongoDB, typescript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages