Socket
Socket
Sign inDemoInstall

http-smpl-router

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    http-smpl-router

A simple router for node http module. Register routes and delegate HTTP requests directly to the router.


Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Simple HTTP Router

A simple router for node.js http module. Register routes express.js style and delegate HTTP requests directly to the router.

Installation

npm install http-smpl-router

Usage

Register GET, POST, PUT, DELETE routes

var http = require('http');
var router = require('http-smpl-router');

http.createServer(function(req, resp){
  router.route(req, resp);
}).listen(3000);

router.get('/helloworld', function(req, resp){
    resp.end("<h1>Hello</h1>" + "World!!");
});

In your browser view http://localhost:3000/helloworld

Keywords

FAQs

Last updated on 29 Mar 2015

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc