
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
bearded-route-list
Advanced tools
#Bearded Route List
I just want to know what the hell I'm doing
This attaches the express.Router()
instance to given endpoints inside of routes
along with building a list of all available endpoints along with the methods. See Example for use case and sample output
##Usage
yarn add bearded-route-list
##Import/Require
import baseList from 'bearded-route-list'
// OR
const baseList = require('bearded-route-list')
##Example
// Import the package
import baseList from 'bearded-route-list'
// Create routes/handlers
const UserRoute = express.Router(),
AuthRoute = express.Router(),
app = express()
// ...
// add endpoints to route
// ...
const routes = [
{
path: '/users',
handler: UserRoute
},
{
path: '/auth',
handler: AuthRoute
}
]
baseList(routes,app) // this will hook into the route '/'
// OR
baseList(routes, app, '/list') // this will hook into route '/list'
And going to '/'
will return this:
{
"/auth": {
"/login": {
"methods": {
"post": true
}
}
},
"/users": {
"/": {
"methods": {
"get": true,
"post": true
}
},
"/:_id": {
"methods": {
"delete": true,
"get": true,
"patch": true
}
}
}
}
##Description
(routes = [], app, base = '/')
With routes
being an array of objects with the following syntax:
{
path: String,
handler: express.Router()
}
App
being an express()
instance
base
being the route you want the list of endpoints to be at.
FAQs
> I just want to know what the hell I'm doing
The npm package bearded-route-list receives a total of 2 weekly downloads. As such, bearded-route-list popularity was classified as not popular.
We found that bearded-route-list 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.