Jetpath is the fast and minimalist framework for Node, Deno and Bun.
Explore Jetpath APIs »
Join Community
.
Report Bug
.
Request Feature
In this version, we added/tested these features on all runtimes.
- auto-generated api documentation UI (Jetpath UI).
- file uploads
- support for websockets
- Jet Plugins.
- Robust schema validation
- Multi-runtime support
- Robust Context and body parser
- Security audits and fixes
- Robust error handling
- Robust logging
- Robust middleware
- Performance enhancements
In this version, multi-runtime support is no-longer based on compatibility but pure engine api(s).
- more speed, same size, more power.
// src/index.jet.js
import { type JetFunc, Jetpath, use } from "jetpath";
const app = new Jetpath({ APIdisplay: "HTTP" });
//? listening for requests
app.listen();
// this goes to = get /
export const GET_: JetFunc = async function (ctx) {
ctx.send("hello world!");
};
// this goes to = post /
export const POST_: JetFunc = async function (ctx) {
ctx.send( ctx.parse() );
};
// this goes to = post /api/v1/payments
export const POST_api_v1_payments: JetFunc = async function (ctx) {
const { amount, currency, account } = ctx.parse();
ctx.plugin.charge({ amount, currency, account });
ctx.send({ success: true, message: "Payment successful" });
};
use(POST_api_v1_payments).body((t)=>{
return {
amount: t.number().required(),
currency: t.string().required(),
account: t.string().required()
}
})
.info("Charge a user's account");
Rationale - Docs
Jetpath is designed for high performance, security and ease of use, using convention over configuration method, jetpath ensure you spend less time on configuration and more time on the functionalities and concise organization of all your projects.
- Jetpath now runs on the runtime you are using, bun or node or deno.
- Function names as routing patterns.
- Middleware and error handler design.
- Inbuilt Cors, body parser, websocket, cookies and logger handlers.
- Inbuilt API auto doc functionality.
- Fast, Small and easy as peasy - jetpath will make your projects shine.
--
Install Jetpath Right away on your project using npm or Javascript other package managers.
npm i jetpath --save
Open sourced And Free.
If you contribute code to this project, you are implicitly allowing your code to be distributed under the Apache 2.0 license. You are also implicitly verifying that all code are your original work. See our contributing guide
Your contribution(s) is a good force for change anytime you do it, you can ensure Jetpath's continues growth and improvement by contributing a re-occurring or fixed donations to our Github sponsors.