0.3.2 • Published 13 years ago
mode v0.3.2
mode.js
A node.js web framework for real-world applications.
Installation
mode.js is primarily built as a true MVC framework, but its simplicity allows you to use it straight out of the box as well.
MVC project
Install mode globally:
$ npm install -g modeCreate project folder and open it:
$ mkdir foo && cd fooBuild MVC structure in current folder:
$ mode initStart app:
$ mode startGo to localhost:1337*
* Change port or other options in conf/settings.js
Non-MVC project
Install mode locally:
$ npm install modeOpen new .js file:
$ vim foo.jsInitialize mode:
var mode = require('mode');
mode.init();Start mode, with a connection callback:
mode.start({port: 1337}, function(path, args, conn) {
conn.close('You are trying to open: ' + path);
});Start app:
$ node foo.jsGo to localhost:1337