0.1.0-alpha.4 • Published 7 years ago
edenjs-core v0.1.0-alpha.4
EdenJS
Awesome isomorphic NodeJS skeleton for structured applications. Just take a look at its bundles.
Why
There are many very good Node/Express/Mongo frameworks around. There is no true "correct" way of build your applications skeleton, what EdenJS tries to do is give you a boilerplate bootstrap/express/mongoDB base for large bundled NodeJS applications.
Features
- Based on ES6 async/await
- Out of the box MVC structured development environment
- Established expressJS application base that you're already used to
- Fully real time with socketio
- Extremely fast isomorphic rendering with riotJS
- Extensible models with mongorito
Quick Development
// use strict
'use strict';
// require local dependencies
var alert = require ('alert');
var controller = require ('controller');
/**
* build example controller
*/
class example extends controller {
/**
* get index action
*
* @route {get} /
*/
indexAction (req, res, next) {
// the same as router.get ('/', example.indexAction)
// uses standard expressJS router
// SSR with riotJS
res.render ('home');
// alert user
alert.user (req.user, 'success', 'successfully loaded index');
}
/**
* socketio event emit
*
* @socket event
*/
eventSocket (Socket, data, User) {
// out of the box socket transport with authentication
// emit directly
Socket.emit ('data', {});
// alert socket
alert.socket (Socket, 'success', 'successfully received event');
}
}
/**
* export example controller
* @type {example}
*/
module.exports = example;
Installation
The entire framework has been written to be built and compiled with gulp. To install and run the boilerplate is as simple as:
// deploy EdenJS
git init; git remote add origin https://github.com/eden-js/eden.git; git pull;
// development
npm install; gulp;
// install (for production)
gulp install;
// run in production
node app;
0.1.0-alpha.4
7 years ago