Lightweight RESTful API framework for NodeJS.
Configuration variables
-
name
[string] Currently not in use -
serverName
[string] Shows in 'server' header -
enableSecurityHeaders
[boolean], Default true -
port
[number] API server port` -
cors
[object] Object where you can set the cors information likemaxAge, origin, credentials
Route
-
method
[string] Request method -
path
[string] Path name, variables in path should start with colon :(ex. /path/:id)
-
middleware
[function || array of functions] Single middleware function or array of a middleware functions -
service
[function] Route controller -
version
[string] Route version (ex.'1.*.*'
)
Without the "version" key is the route version 1.0.0 and it is accessible from v1/ before the route path ( /v1/here/is/route/path )
npm install perfusorius-js --save