men

2.2.1 • Public • Published

MEN

A Module based Express framework by Node.js

Heavily inspired by (copied/extracted from) MEAN.JS

Quick Start

var men = require('men');
men.start();

Project Structure

.
├── config
│   ├── default.js             # default/base config
│   ├── development.js         # development config
│   ├── production.js          # production config
│   └── local.js               # local config
├── modules
│   ├── user                   # user module example
│   │   ├── route.js           # express route for user
│   │   ├── controller.js      # user controller
│   │   └── service.js         # user service
│   └── ...
├── public
│   └── ...                    # public static files
├── view
│   └── ...                    # express ejs views
└── app.js                     # server entry point

Configuration

All config entries are optional. See config.example.js

For postgres, sequelize instance and models are bound to Sequelize as Sequelize.sequelize and Sequelize.models.

All express functions can be overwritten by men.express:

var men = require('men');
 
men.express.initSession = function(app) {
  var session = require('express-session');
  var MongoStore = require('connect-mongo/es5')(session);
 
  men.config.express.session.store = new MongoStore({
    url: men.config.express.session.store.url,
  });
 
  app.use(session(men.config.express.session.options));
};
 
men.start();

Readme

Keywords

Package Sidebar

Install

npm i men

Weekly Downloads

76

Version

2.2.1

License

MIT

Unpacked Size

15.9 kB

Total Files

13

Last publish

Collaborators

  • loulin