cela

Node.js server, app, and site framework.

npm install cela
36 downloads in the last month

Cela

Node.js based server, app and website framework.

Quick Start

Install cela

$ npm install cela

Create an app

$ nano my_app.js

Implement cela and save your app

// Init cela object

var cela = require( 'cela' );

// Create your app with the cela object

var my_app = cela({
  name: 'My App'
});

// Console message

my_app.info( 'API and documentation in development.' );

// Try the included demo moda (module)

// // Says hello on your terminal console

my_app.moda.demo.hello();

// Add some middleware

my_app.server.use( function ( req, res ) {

  // Respond // NOTE // Routing software coming

  res.writeHead(200, {'Content-Type': 'text/plain'});

  res.end('Hello World\n');

});

// Add some routes (in development)

my_app.server.router.get( '/hello', function ( req, res ) {

  res.end( 'Hello World' );

});

my_app.server.router.set({
  type: "get",
  path: "/hi",
  cb: function ( req, res ) {
    res.end( "Hi there!" )
  }
});

// Start server

my_app.server.listen( '3333', function listen_callback (  ) {

  my_app.confirmation( 'My App server listening.' );

});

Run your app

$ node my_app

Browse to your server

http://localhost:3333

Enjoy! Thanks for your patience as I port over more work.

Also, stay tuned for the coming routing software.

npm loves you