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

express-router-ns

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-router-ns

This package replaces the obsolete express-namespace

latest
npmnpm
Version
1.0.3
Version published
Weekly downloads
11
83.33%
Maintainers
1
Weekly downloads
 
Created
Source

express-router-ns

This package replaces the obsolete express-namespace

You want to migrate from Express 3.x with express-namespace

require('express-namespace')
var express = require('express')
var app = express();

# registering /a/b/c route
app.namespace('/a', function() {
  app.namespace('/b', function() {
    app.get('/c', function(req, res) {
      res.end();
    });
  });
});

Usage with Express 4.x with express-router-ns

var express = require('express')
var ExpressRouterNs = require('express-router-ns')(express.Router);
var app = express();
var appRouter = new ExpressRouterNs();

app.use(appRouter)

# registering /a/b/c route
appRouter.namespace('/a', function() {
  appRouter.namespace('/b', function() {
    appRouter.get('/c', function(req, res) {
      res.end();
    });
  });
});

FAQs

Package last updated on 01 Jul 2017

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