Overview
Welcome to the documentation for server API! The API is built on Node.js and uses the Express.js framework, with a MySQL database for data storage.
Methods
- It provides definitions for the CRUD operations on every endpoint by default.
- It also supports additional paths to create a new end point other than the generic ones.
Validation
- Validation of input data sent to the backend is handled using the Joi library.
- A schema is defined in the api for each path of an endpoint which handles the validation.
Database
- A database model is defined for every endpoint.
- The saving of data in the database is automated, however this behavior can also be changed to handle the saving manually for any specific path of an endpoint.
Data Formatting
- Data can be manipulated to format it :
- Before saving in the database to perform some additional validations.
- After saving in the database to manipulate the format of the response sent to the client.
Security
- There are three types of security associated with each endpoint.
- No login required.
- Login required.
- Specific type of users only.
- Different security type can be defined for the complete endpoint as a whole or different security can be defined for each path of the endpoint.
No Comments