Skip to content

Simple boiler plate for rest-api with express written in typescript

Notifications You must be signed in to change notification settings

alagarsamy1/express-api-ts-boilerplate

 
 

Repository files navigation

express-api-ts-boilerplate

A Simple boiler plate for developing RESTful api with express.js written in typescript. It includes standard middleware functions with default settings configured with express out of the box. It also includes a folder structure to help you get started with the project right away.

Getting started

Download the project in to your computer from the releases section and extract the contents in a known location. To install the dependencies use

npm install

Edit the package.json to fit your project and start working.

Packages included

  1. helmet.

    Secures the api by setting various http headers. Get more information at https://helmetjs.github.io/

  2. body-parser.

    Parses the request body from the incoming request. It's provided by express.js. Get more information at https://github.com/expressjs/body-parser

  3. cors.

    Used for setting up cross origin rules. It's also provided by express.js. Get more information at https://github.com/expressjs/cors

  4. typeorm.

    An ORM for Database operations. Get more information at https://typeorm.io/

  5. class-validator.

    Validator with typescript decorators. Get more information at https://github.com/typestack/class-validator

  6. jsonwebtoken.

    For Usage of JWT in the project. Get more information at https://github.com/auth0/node-jsonwebtoken

  7. jwk-to-pem.

    Convert a json web key to a PEM for use by OpenSSL or crytpo. Get more information at https://github.com/Brightspace/node-jwk-to-pem

  8. bcrypt.

    For hashing passwords. Get more information at https://github.com/kelektiv/node.bcrypt.js

  9. dotenv For storing environment variables. Get more information at https://github.com/motdotla/dotenv#readme

Development tools

  1. Mocha

    Test framework. Get more information at https://mochajs.org/

  2. Chai

    Assertion tool used in combination with mocha. Get more information at https://www.chaijs.com/

  3. ts-node

    Runs the project directly in typescript. Get more information at https://github.com/TypeStrong/ts-node

  4. Debugger

    Pre configured debug configuration for VScode editor.

About

Simple boiler plate for rest-api with express written in typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.2%
  • HTML 12.4%
  • JavaScript 1.7%
  • CSS 0.7%