Socket
Socket
Sign inDemoInstall

rapidly

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rapidly

This helper can help you set your API routes/actions rapidly based on Express.js


Version published
Weekly downloads
5
decreased by-16.67%
Maintainers
1
Weekly downloads
 
Created
Source

Rapidly

This is an API helper built on Express.js, with this, you can rapidly manage your own API paths/actions on the fly.

Installation

npm install -g rapidly

Command

Usage:

rapidly [options]

Options:

-h, --help          output usage information
-V, --version       output the version number
build [schemaName]  Build Necessary Files/Directories
--rebuild           Rebuild the Schema File 

Setup

  • 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);

Notice

  • When using rapidly, remember to change current directory to the root path of your Express.js App. Otherwise, rapidly would 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 express-validator to help.

  • Set up expressValidator on the top of server.js ( express.js entry point )

var expressValidator = require('express-validator');
  • Use expressValidator middleware for express.js
app.use(expressValidator);

Author

EragonJ ( Chia-Lung, Chen )

LICENSE

MIT License

Keywords

FAQs

Package last updated on 17 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc