Skip to content
This repository has been archived by the owner on Aug 19, 2019. It is now read-only.
/ elephas Public archive

Some added sugar on top of express to give our our some sensible defaults and a little structure.

License

Notifications You must be signed in to change notification settings

bigdatr/elephas

Repository files navigation

elephas Circle CI Coverage Status

Some added sugar on top of express to give our app some sensible defaults and a little structure.

Install

npm install elephas --save

Quick Start

var config = {
	__dirname: __dirname,
    server: {
        port: 3000,
        cluster: false
    },
    httpsOnly: process.env.NODE_ENV === 'production'
};

var elephas = require('elephas')(config);
elephas.createServer();

##Options ...

##Hooks Using the following hooks, you can jump in between each stage of the boot process to run your own code. You MUST execute the done() callback so that the boot process can continue. All hooks are optional.

elephas.createServer({
    beforeRoutes: function(done, app) {
        // Do some stuff here

        done(); // Let elephas know when you have finished
    }
});

####List of hooks (in order of execution)

  • beforeServices
  • beforeMiddleware
  • beforeRoutes
  • afterRoutes
  • onComplete

Testing

npm test

License

BSD

About

Some added sugar on top of express to give our our some sensible defaults and a little structure.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •