[BETA] express-gerJs
Use gerJs library plus use the models to validate and reformat the input/ouput payload in the API.
Example : https://github.com/dobobaie/example-express-gerjs-server
Help us to improve the project by contributing 👥
☁️ Installation
$ npm install gerjs-express
📝 Usage
Use gerjs-core documentation to create modelsAPI
file.
Initialization
Create a new instance :
Then create the models. Joi
is required.
const modelsAPI = ;const gerJs =// same gerjs-core options | except `destinationPath` is not availableexportTo: 'path/doc' // string ; optionalmodelsAPI;
⚙️ GerJs initialization in Express side
const express = ;const app = ;// please use all the middlewares beforeapp; // middleware to validate payload and reformat reponse | requiredapp// routes...// expose the swagger documentation | optional;
👥 Contributing
Please help us to improve the project by contributing :)
❓️ Testing
Clone the repo and run from the project root:
$ npm install
$ npm test