Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elephas

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elephas

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

  • 0.1.14
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

elephas Build 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 = {
    server: {
        port: 3000
    }
};

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

##Logging A winston logger.

var logger = require('elephas/lib/logger');

logger.info('Info message');
logger.warn('Warning message');
logger.error('Error message');

Testing

npm test

License

BSD

Keywords

FAQs

Package last updated on 30 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc