solfegejs

The Solfege framework

SolfegeJS

The modular framework for NodeJS.

  • NodeJS >= 0.12
  • Babel >= 5
npm install solfegejs

Create your application file ./bundle-es6/MyBundle.js:

import solfege from "solfegejs";
 
export default class MyBundle
{
    constructor()
    {
    }
 
    *setApplication(application)
    {
        application.on(solfege.kernel.Application.EVENT_START, this.onApplicationStart);
    }
 
    *onApplicationStart()
    {
         console.log("woot");
    }
}

Create the startup file ./bundle-es6/console.js:

import solfege from "solfegejs";
import MyBundle from "./MyBundle";
 
// Initialize the application 
let application = new solfege.kernel.Application(__dirname);
 
// Add the internal bundle 
application.addBundle("myBundle", new MyBundle);
 
// Start the application 
application.start();

Compile with Babel :

babel ./bundle-es6 --blacklist=regenerator --out-dir ./bundle-es5

Start the application :

node --harmony --harmony-proxies ./bundle-es5/console.js