New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

simpleweb

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simpleweb

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

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

SimpleWeb

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

Installation

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

npm install simpleweb

Usage

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 (req, res) { /* .... */ });
app.get('/customer', function (req, res) { /* .... */ });
app.get('/customer/new', function (req, res) { /* .... */ });
app.post('/customer/new', function (req, res) { /* .... */ });
app.get('/supplier', function (req, res) { /* .... */ });

// Launch the web server

var server = http.createServer(app).listen(8000);

TBD

Development

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

Samples

Static Simple site with static pages.

Customers Dinamic pages, in-memory repository.

Contribution

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.

Keywords

http

FAQs

Package last updated on 31 Dec 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts