
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
bootstruct
Advanced tools
Bootstruct is a web framework for Node, based on a folder-structure / file-name convention.
Routing by structure.
Creating web apps with Node requires wiring up our routes, we need to bind different URL paths to their handlers. We usually do that by declerative coding. Something like: bind('GET', '/api/books', handler)
.
With Bootstruct you don't code your routes. You just export your handler and name the file with its route name.
Technically, Bootstruct creates routes by parsing your routes folder and routes requests through that folder's structure, matching URLs to corresponding paths under that folder.
Meaning, to support routes like:
domain.com/
domain.com/A
domain.com/A/B
domain.com/A/B/C
your routes folder tree would generally look like:
├── routes
│ ├── index.js
│ └── A
│ ├── index.js
│ └── B
│ ├── index.js
│ └── C
│ └──index.js
When working with middlware functions (express
, connect
...) you control request flow by binding 'this' route before 'that' route. The order in which you code your routes matters.
Bootstruct provides you with an onion-like layered app by leveraging the parental folder chain. So a request to /A/B/C
would go through:
1. /
2. /A
3. /A/B
4. /A/B/C
5. /A/B
6. /A
7. /
Do you see the onion?
Bootstruct uses files and folders with certain names as different hooks.
For example, to handle GET
requests, name your handler file _get.js
. To handle POST
requests, name it _post.js
.
You can create your own hooks
/A/B/whatever
)
Questions, suggestions, criticism, bugs, hugs, typos and kudos are all welcome.
taitu.dev (at) gmail dot com
FAQs
Routing by structure. A name-convention web framework for Node.js.
The npm package bootstruct receives a total of 26 weekly downloads. As such, bootstruct popularity was classified as not popular.
We found that bootstruct 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.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.