simpleweb

Simple middleware layer for web applications, inspired by Connect and others. Work in Progress.

SimpleWeb

Simple middleware layer for web applications, inspired by Connect and others. Work in Progress.

Via npm using (Node.js)[http://nodejs.org]:

npm install simpleweb

Reference in your program:

var simpleweb = require('simpleweb');

A simple web server:

var simpleweb = require('simpleweb'),
    http = require('http');
 
var app = simpleweb();
 
// Configuring middleware 
 
app.use(simpleweb.query());
app.use(simpleweb.body());
app.use(app.router);
app.use(simpleweb.static(path.join(__dirname, 'public')));
 
// Configuring routes 
 
app.get('/', function (reqres) { /* .... */ });
app.get('/customer', function (reqres) { /* .... */ });
app.get('/customer/new', function (reqres) { /* .... */ });
app.post('/customer/new', function (reqres) { /* .... */ });
app.get('/supplier', function (reqres) { /* .... */ });
 
// Launch the web server 
 
var server = http.createServer(app).listen(8000);

TBD

git clone git://github.com/ajlopez/SimpleWeb.git
cd SimpleWeb
npm install
npm test

Static Simple site with static pages.

Customers Dinamic pages, in-memory repository.

Feel free to file issues and submit pull requests � contributions are welcome.

If you submit a pull request, please be sure to add or update corresponding test cases, and ensure that npm test continues to pass.