
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.
A compact, high-performance and full-featured web framework based on nodejs. The features include:
npm i nodable
const app = require("nodable");
app
.serve("/assets/*")
.engine({
root: "template",
imports: { globalName: "" },
})
.on("error", (err, ctx) => {
console.error(err);
ctx.body = {
status: ctx.status,
message: ctx.body,
};
})
.use(async (ctx, next) => {
ctx.custom = "xxxx";
await next();
})
.get("/", async (ctx) => {
console.log(ctx.query);
console.log(ctx.params);
})
.listen();
app.serve(path) Serve static resources with the given path. It's the
syntactic sugar for get routing, so the path must starts with "/".app.engine(options) Enable template engine with options { root, imports }.app.on("error", function) Custom unified error handling.app.use(function) Add a middleware like koa.js.app.get(path, [tmpl,] function) Add dynamic route including post, put,
delete and other standard request methods, it will auto-render template if
tmpl parameter exists.app.listen([port]) Create and start an application server on the specified
port.app.callback() Return a request handler for node's native http server.ctx.params Get params in route path, wildcard supportsctx.query Get params in query stringctx.method Get request methodctx.path Get request pathctx.url Get request full hrefctx.protocol Get request protocolctx.host Get request hostctx.hostname Get request hostnamectx.origin Get request originctx.headers Get headers objectctx.cookies Get cookies objectctx.status Get response status codectx.body Get response bodyctx.request Get native requestctx.response Get native responsectx.status= Set response status codectx.body= Set response bodyctx.get(name) Get request headers by namectx.set(name, value) Set response headersctx.cookie(name, value[, options]) Set cookiesasync ctx.json() Get request body in jsonasync ctx.text() Get request body in textasync ctx.buffer() Get request body in bufferctx.redirect(url[, status]) Redirect url with status default 301ctx.view(path, data) Render template file, only if engine enabled.ctx.render(path, data) Render template text, only if engine enabled.ctx.throw(message, status) Throw an error with status code/static static route/* Wildcard route, it will return wildcard variable in ctx.params/:user/:user?/:user(\\d+){{ }} Evaluate code snippet in javascript. Note that the variables do not
need to be declared. ex. {{ result = 60*60; }}
{{= }} Interpolation. ex. {{= username }}
{{? }} {{?? }} {{? }} Conditional statement. ex.
{{? gender == 0 }}
<div>Female</div>
{{?? gender == 1 }}
<div>Male</div>
{{?? }}
<div>Unknown</div>
{{? }}
{{~ }} {{~ }} Iterative statement. ex.<ul>
{{~ users:user:index }}
<li>{{= index+1 }} - {{= user.name }}<li>
{{~ }}
</ul>
{{> }} Block placeholder.{{< }} Block content definition.{{> content }}
{{< content }}
<h1>Hello.</h1>
{{< }}
{{@ }} Partial including in layout mode. You must be rendered by
view(file, data) method.// index.html
{{@ header.html }}
// header.html
<h1>Hello.</h1>
FAQs
A compact, high-performance and full-featured web framework based on nodejs.
We found that nodable 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.