essen

0.3.19 • Public • Published

Essen.js

Inspired by Sails.js, powered by Express.js

NPM Version NPM Downloads

Install

$ npm install essen -g
$ essen create -t users -p projectfolder

Run

cd project_name
$ node app.js

Configure

  • config/custom.js - Custom cofig. Define your global variables here
  • config/server.js - Server config. Change port and name for your app
  • config/db.js - DB config. Change host and DB name for your mongoDB
  • config/bootstrap.js - Code inside this module will be executed before HTTP server starts
  • config/log.js - Logger config. Only level option here
  • config/middlewares.js - Middlewares config. Use this array to push your own middlewares. Position on array means middleware position on request
  • config/env.js - Environment configs. Configure DB and server for each NODE_ENV
  • config/socket.js - Socket config. Enable or disable socket.io listener
  • controllers - Controllers directory. Check IndexController.js for example
  • models - Models directory. Check UserModel.js for example
  • middleware - Middleware directory. Check some of them, it's simple Express middleware
  • router - Router folder. Create your routes here
  • services - Services directory. You can use each service in every place

Features

  • Quick start
  • Router with children and namespaces
  • API versioning
  • Human style controllers
  • ORM with methods, statics, middleware
  • Custom requests middleware
  • Environment configs
  • Socket.io support
  • Handy CLI (generator)

TODO

  • Cli -> Clear dir when its not empty
  • Core -> errors handling
  • Core -> refactoring
  • Security Policies

License

ISC

Package Sidebar

Install

npm i essen

Weekly Downloads

2

Version

0.3.19

License

ISC

Last publish

Collaborators

  • externuz