This helper can help you set your API routes/actions rapidly based on Express.js
Want to see pretty graphs? Log in now!
npm install rapidly
|16||downloads in the last month|
|Last Published By|
|Version||0.0.5 last updated a year ago|
|Keywords||rapidly, api, express|
This is an API helper built on Express.js, with this, you can rapidly manage your own API paths/actions on the fly.
npm install -g rapidly
-h, --help output usage information -V, --version output the version number build [schemaName] Build Necessary Files/Directories --rebuild Rebuild the Schema File
Generate your API routes by rapidly first
Set up Rapidly on the top of server.js ( express.js entry point )
var Rapidly = require('rapidly');
- Set Rapidly route on the last part of your routes settings ( Make sure Rapidly would not override your routes ). You can change the path to your api routes ( In the example setting, all requests passed into http://myDomain/api/XXXXX would be routed to Rapidly )
app.all('/api/*', new Rapidly);
rapidly, remember to change current directory to the root path of your Express.js App. Otherwise,
rapidlywould generate files in a wrong place.
Because Rapidly is based on express.js, it would be better to include some validation / sanisization logic here. For me, I will try to include
Set up expressValidator on the top of server.js ( express.js entry point )
var expressValidator = require('express-validator');
- Use expressValidator middleware for express.js
EragonJ ( Chia-Lung, Chen )