Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
express-list-routes-cuz
Advanced tools
List all routes used in Express[3,4,5]
[![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url]
Example App
const express = require('express');
const ExpressListRoutes = require('express-list-routes-cuz');
var expressListRoutes = new ExpressListRoutes();
const app = express();
app.get('/health', fn)
app.use('/admin', router);
router.route('/user')
.post(fn)
.get(fn)
.put(fn);
List all Routes with prefix
expressListRoutes.discover(app, { prefix: '/api/v1' });
// Logs out the following:
// GET /api/v1/health
// POST /api/v1/admin/user
// GET /api/v1/admin/user
// PUT /api/v1/admin/user
Or only log out nested router routes
expressListRoutes.discover(router);
// Logs out the following:
// POST /admin/user
// GET /admin/user
// PUT /admin/user
Get all routes after discover from every where
const routes = expressListRoutes.getRoutes();
// Logs out the following:
/*
[
{ method: 'GET', stackPath: '/' },
{ method: 'GET', stackPath: '/users' },
{ method: 'GET', stackPath: '/v1/articles' },
{ method: 'POST', stackPath: '/v1/articles' },
{ method: 'GET', stackPath: '/v1/articles/:docId' },
{ method: 'PATCH', stackPath: '/v1/articles/:docId' },
{ method: 'DELETE', stackPath: '/v1/articles/:docId' }
]
*/
npm install express-list-routes-cuz
You can pass a second argument to set some options
{
prefix: '', // A prefix for router Path
spacer: 7, // Spacer between router Method and Path,
showLog: false // Show log in discover, default true
}
FAQs
List routes for Express 3,4,5
The npm package express-list-routes-cuz receives a total of 4 weekly downloads. As such, express-list-routes-cuz popularity was classified as not popular.
We found that express-list-routes-cuz demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.