RESTful API with node, express, typescript and jest
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci changed node in config.yml Jan 27, 2018
@types change api architecture Dec 17, 2017
src fixed models factories Feb 26, 2018
.env.example added tests for testing emails sending and resetPassword functionality Dec 29, 2017
.gitignore
.sequelizerc change api architecture Dec 17, 2017
LICENSE
README.md link fix Oct 19, 2018
package.json
tsconfig.json change api architecture Dec 17, 2017
yarn.lock refactored status codes Feb 25, 2018

README.md

rest-api-node-typescript

CircleCI codecov

RESTful API with node, express, typescript and jest!

API with following requirements in mind:

  1. Handle CRUD (create, read, update, delete) on resources (posts, comments, users, roles, permissions)
  2. Access to the API will be secured with JWT auth + RBAC (Role-based access control)
  3. Data will be returned in JSON format
  4. All requests will be logged to the console

It is a great starting point for blogging platform.

Technologies used:

  • Typescript
  • Express.js
  • Sequelize
  • JWT
  • jest
  • codecov

Setup

  1. Install dependencies
npm install or yarn
  1. Build your api
npm run build or yarn build
  1. Start your api
npm run start or yarn start

Development

npm run test or yarn test

//watch mode
npm run test:watch or yarn test:watch

Credits

Big thanks to Ryan Smith and his introduction to (3 layer architecture)[https://medium.com/@ryansmith/3la-introduction-b45219e323d8]