Skip to content

Latest commit

 

History

History
62 lines (39 loc) · 1.35 KB

readme.md

File metadata and controls

62 lines (39 loc) · 1.35 KB

Build Status

I'm gonna code a RestFul with Express, Typescript

REST: Representational State Transfer API: application programming interface

Setup

Prerequisites:

  • NodeJS 8+
  • npm 3
$ npm install

Env variables in sample file. You can copy and rename it to .env and edit varialbe value with your own value.

Linting and testing tools

Basic mongodb schema: http://learnmongodbthehardway.com/schema/schemabasics

DATABASE

Reference-style: alt text

One to one

One to many

http://learnmongodbthehardway.com/schema/schemabasics/#one-to-many-1-n

Many to many

Database design

Rest API design

https://hackernoon.com/restful-api-designing-guidelines-the-best-practices-60e1d954e7c9

Todos

  • JWT problems
  • Better error handler
  • Support swagger docs
  • Support multiple language
  • Integrate with front end
  • Add ci/cd unit test

Test

  • Test runner: Jest, Supertest
  • Coverage: npm run coverage
  • Unit test: npm run test