Allows for loading resources from a filesystem structure matching the URI

npm install express-resourceful
5 downloads in the last month


This express extension allows for you to separate your resources into individual files, and to organize them in a filesystem hierarchy matching the URI.

An individual resource file can export any number of HTTP methods supported by Node.js and Express.js. Examples include the usual get/put/post/delete, but can include others. (see methods NPM module for a complete list)

To add a resource to your application/routes, just add a new file under a dedicated resources directory. It's name and directory structure should match the URI, with the exception being index.js which will simply be mapped to the directory name.


npm install express-resourceful

Quick Sample


  | +-index.js        -> /
  | +-users/
  |   +-index.js      -> /users
  |   +-:user.js      -> /users/:user

Resource File

exports.get = function (req, res) {
    // Route Handler for a GET request on this URI
}; = function (req, res) {
    // Route Handler for a POST request on this URI

Change Log


  • Initial Release
npm loves you