@appt/api

This package brings and wraps to the Appt's ecosystem all the essential packages, middlewares and configurations to build a ready-to-go REST Api.

We assume you got here after seeing the Getting Started page. If you don't, we strongly recommend you to step back an take a 5 minutes reading to get used with some key concepts we're going to apply here.

Install

$ npm install @appt/api --save

Third-Party

We don't want re-invent the wheel! Thanks to these amazing packages out there we can go straight to the point. There is some of those we're using at this project:

  • body-parser to handle the request parameters;

  • express to run api's Server, Routes, Statics, cross-domain(CORS) and so on...

  • express-jwt to handle the access control;

Resources

The @appt/api exports some resources which can be imported as seen below:

import {
TServer,
TRouter,
api
} from '@appt/api';
import {
Get,
Post,
Put,
Delete,
Patch,
...
} from '@appt/api/router';