
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
HapiBoot is a small helper library to load modules when you have a large and structured Api.
HapiBoot loads your modules from a given path and registers them as plugins. So you can easily structure your api and manage dependencies.
npm install hapiboot --save
Modify your hapi start
//Load HAPI
let Hapi = require('hapi');
//Load HapiBoot
let Boot = require('hapiboot');
//Create server
const server = new Hapi.Server();
//Instantiate hapiBoot
let hapiBoot = new Boot(server, require('./config/boot.json'));
// start hapiBoot
hapiBoot.boot();
// Default hapi config and startup
server.connection({
host: 'localhost',
port: process.env.PORT || 3000
});
server.on('log', (event, tags) => {
console.log(event.data);
});
// Start the server
server.start((err) => {
if (err) throw err;
server.log(['info', 'debug'],'Server running at: '+server.info.uri);
});
Create the config file boot.json
{
"api" : {
"root" : "api/modules", //Define where your modules are located
},
"modules":[ //Define which modules should be loaded
"helloWorldModule"
]
}
FAQs
Auto load hapi modules
We found that hapiboot 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.