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

oneone

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oneone

oneone is an http server library for node.js that aims to more completely support http 1.1

latest
Source
npmnpm
Version
0.6.3
Version published
Weekly downloads
30
-18.92%
Maintainers
1
Weekly downloads
 
Created
Source

oneone

Build
Status Coverage Status NPM version

oneone is an http server library for node.js that aims to more completely support http 1.1

It has only a few simple goals:

  • make basic RFC2616 features as easy as possible.
  • don't alter core node classes where possible (esp. request and response objects)
  • handle routing
  • make extension possible and easy

It should be possible to use oneone as the basis of a framework.

A Hello World Example:

var Server = require('oneone');

var server = new Server(8080);

server.onRequest(function(handler, context, cb){
  console.log(' <-- ', context.req.method, ' ', context.req.url);
  cb(null, context);
});

server.route('/hello', { GET : function($){ 
                                 console.log("hideyho");
                                 $.res.end("hideyho"); 
                               }
                        });

server.listen(function(err){
  if (err) {console.log(err);throw err;}
  console.log(server.router.routes);
  console.log('Server running on ' + server.port);
});

Automated Tests:

npm test

Keywords

api

FAQs

Package last updated on 21 Jun 2014

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