
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
@axiosleo/koapp
Advanced tools
[](https://npmjs.org/package/@axiosleo/koapp) [](https://npmjs.org/package/@axiosleo/koap
Design for quickly developing Web applications using Node.js
Based on koa
npm install @axiosleo/koapp
npx @axiosleo/koapp init <app-name> -d <optional-dir>
# show help info
# npx @axiosleo/koapp init -h
const { KoaApplication, Router, success } = require("@axiosleo/koapp");
const handle = async (ctx) => {
success({
message: "Hello World!",
});
};
const router = new Router("/test", {
method: "any",
handlers: [handle],
});
const app = new KoaApplication({
port: 8088,
listen_host: "localhost", // 0.0.0.0 for public access
routers: [router],
});
app.start();
// open http://localhost:8088/test
see validatorjs for more rule examples
see
Routerexamples for more usage: tests/bootstrap.js
const { Router } = require("@axiosleo/koapp");
const router = new Router("/test", {
method: "any",
validator: {
// url params, like `/test/{:id}`, the 'id' is required and must be an integer
params: {
id: "required|integer",
},
query: {
name: "required|string",
},
body: {
age: "required|integer",
}
}
handlers: [],
});
const { _foreach, _sleep } = require("@axiosleo/cli-tool/src/helper/cmd");
const test = async (context) => {
await _foreach(["0", "1", "2", "3"], async (item, index) => {
context.koa.sse.send({ data: { item, index } });
await _sleep(1000);
});
context.koa.sse.end();
};
const { KoaSSEMiddleware } = require("@axiosleo/koapp");
root.any("/sse", async (context) => {
const func = KoaSSEMiddleware();
await func(context.koa, async () => {});
context.koa.sse.send({ data: "hello, world!" });
process.nextTick(test, context);
});
This project is open-sourced software licensed under MIT.
FAQs
[](https://npmjs.org/package/@axiosleo/koapp) [](https://npmjs.org/package/@axiosleo/koap
The npm package @axiosleo/koapp receives a total of 174 weekly downloads. As such, @axiosleo/koapp popularity was classified as not popular.
We found that @axiosleo/koapp demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.