express-mountie

3.0.0 • Public • Published

Build Status Dependency Status Code Climate

NPM

express-mountie

Express Service Auto-Discovery and Mounting

express-mountie is a microlibrary for discovering express routers and apps and then mounting them into a master express app. This is useful for organization and strict segregation of RESTful resources. Organizing services in this way will allow you to break apart and independently scale your webapps when it becomes appropriate.

project
│   README.md
│   Gulpfile.js
└───server
    ├───apps
    |   └───subresourceA
    |   |   └───index.js (exports express app)
    |   └───subresourceB
    |       └───index.js (exports express router)
    │   main.js
// main.js
var express = require('express'),
    mountie = require('express-mountie'),
    path = require('path'),
    app = express();
    
mountie({
    parent: app,
    src: path.join(__dirname, './apps'),
    prefix: '/api'
});
app.listen(3000);

Installation

$ npm install express-mountie --save

Readme

Keywords

Package Sidebar

Install

npm i express-mountie

Weekly Downloads

1

Version

3.0.0

License

Apache

Last publish

Collaborators

  • natoverse
  • darthtrevino