Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@hapipal/hecks
Advanced tools
Mount your express app onto your hapi server, aw heck!
Lead Maintainer - Devin Ivy
See also the API Reference
Hecks is intended for use with hapi v19+ and nodejs v12+ (see v2 for lower support).
Hecks allows you to seamlessly incorporate express applications into a hapi v17+ server. This is particularly useful for testing an express server using server.inject()
, for unifying deployment of existing express and hapi applications, and as an initial stepping stone in migrating an express application to hapi.
const Express = require('express');
const BodyParser = require('body-parser');
const Hapi = require('@hapi/hapi');
const Hecks = require('@hapipal/hecks');
(async () => {
const app = Express();
app.post('/user', BodyParser.json(), (req, res) => {
const user = { ...req.body };
user.saved = true;
res.json(user);
});
const server = Hapi.server();
await server.register([
Hecks.toPlugin(app, 'my-express-app')
]);
const { result } = await server.inject({
method: 'post',
url: '/user',
payload: { name: 'Bill', faveFood: 'cactus' }
});
console.log(result); // {"name":"Bill","faveFood":"cactus","saved":true}
})();
FAQs
Mount your express app onto your hapi server, aw heck!
The npm package @hapipal/hecks receives a total of 483 weekly downloads. As such, @hapipal/hecks popularity was classified as not popular.
We found that @hapipal/hecks 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.