express-routes-dir

0.0.1X • Public • Published

Express Routes Dir

In /routes/routes.json:

{
	"routes":{
		"/index" : "get",
		"/update" : "post"
	}
}

/routes:

routes.json
index.js
update.js

In your server:

var dir = require("express-routes-dir");
dir(["routes"],app);
/* optional */ dir(["user-update","user-list"],app,"/user" /* prefix http routes with /user) */ // use multiple directories

/express-routes-dir/

    Package Sidebar

    Install

    npm i express-routes-dir

    Weekly Downloads

    2

    Version

    0.0.1X

    License

    BSD

    Last publish

    Collaborators

    • ariporad