Package Exports
- nhttp-land
- nhttp-land/class-validator
- nhttp-land/controller
- nhttp-land/cors
- nhttp-land/deps
- nhttp-land/etag
- nhttp-land/jsx
- nhttp-land/jsx/helmet
- nhttp-land/jsx/jsx-dev-runtime
- nhttp-land/jsx/jsx-runtime
- nhttp-land/jsx/render
- nhttp-land/jsx/twind
- nhttp-land/jwt
- nhttp-land/serve-static
- nhttp-land/swagger
- nhttp-land/trpc
- nhttp-land/zod-validator
Readme
NHttp
An Simple web-framework for Deno and Friends.
Features
- Focus on simple and easy to use.
- Fast Performance. One of the fastest Frameworks.
- Cross runtime support (Deno, Node, Bun, etc).
- Low overhead & True handlers (no caching anything).
- Built-in Middleware.
- Sub router support.
- Template engine support (jsx, ejs, nunjucks, eta, pug, ..etc).
- Return directly on handlers.
- Auto parses the body (
json / urlencoded / multipart / raw).
Installation
deno.land
import nhttp from "https://deno.land/x/nhttp/mod.ts";deno-npm
import nhttp from "npm:nhttp-land";npm/yarn
npm i nhttp-land
// or
yarn add nhttp-land// module
import nhttp from "nhttp-land";
// commonjs
const nhttp = require("nhttp-land").default;Usage
Create file app.ts and copy-paste code.
import nhttp from "https://deno.land/x/nhttp/mod.ts";
const app = nhttp();
app.get("/", () => {
return "Hello, World";
});
app.get("/cat", () => {
return { name: "cat" };
});
app.listen(8000, (err, info) => {
if (err) throw err;
console.log(`> Running on port ${info.port}`);
});Run
deno run --allow-net app.tsmore docs => https://nhttp.deno.dev
