An Simple web-framework for Deno and Friends.
MIT License
Bot releases are visible (Hide)
charset
in options.viewport
in options.minify
css.content
in types
.Published by herudi 4 months ago
@nhttp/tailwind
.UTF-8
.Published by herudi 4 months ago
in version 2, NHttp has been published to jsr.io.
Here's how to install it :
// Deno
deno add @nhttp/nhttp
// npm
npx jsr add @nhttp/nhttp
// Yarn
yarn dlx jsr add @nhttp/nhttp
// pnpm
pnpm dlx jsr add @nhttp/nhttp
// Bun
bunx jsr add @nhttp/nhttp
nhttp-land
from npm
. use @nhttp/nhttp
instead.jsr
. ref => https://nhttp.deno.dev/docs/ext-library
Published by herudi 6 months ago
fix(node): multiple set-cookie at once #89 from issue #88
Published by herudi 8 months ago
Published by herudi 9 months ago
Published by herudi 9 months ago
rev.route
.zIndex
.Published by herudi 9 months ago
Response
when stream.Published by herudi 9 months ago
next
when streaming.Options
for all libs.Published by herudi 9 months ago
router.add
alias to router.on
.rev.undefined()
. force undefined
in return directly.NHTTP
(RequestEvent, HttpResponse).useInternalHook
for better manage hook internally.Published by herudi 10 months ago
at-click
to @click
const Home = () => <button at-click="click()">click</button>;
// render to string => <button @click="click()">click</button>
cause in JSX, not support @
or :
in attr-key.
Published by herudi 10 months ago
import nhttp from "https://deno.land/x/[email protected]/mod.ts";
import { htmx, renderToHtml } from "https://deno.land/x/[email protected]/lib/jsx.ts";
const app = nhttp();
app.engine(renderToHtml);
app.use(htmx());
app.get("/", () => {
return (
<button hx-post="/clicked" hx-swap="outerHTML">
Click Me
</button>
);
});
app.post("/clicked", () => {
return <span>It's Me</span>;
});
app.listen(8000);
Published by herudi 10 months ago
Published by herudi 10 months ago
@Type
decorators.useParams
, useQuery
, useBody
, useRequestEvent
... etc.renderToReadableStream
.AsyncComponent
.Published by herudi 11 months ago
precompile
.Deno has claimed 7 ~ 20x faster. ref => fastest jsx transform.
config deno.json
{
"compilerOptions": {
"jsx": "precompile",
"jsxImportSource": "nhttp-jsx"
},
"imports": {
"nhttp-jsx/jsx-runtime": "https://deno.land/x/[email protected]/lib/jsx/jsx-runtime.ts"
}
}
Published by herudi 11 months ago
jsx
and Helmet
by @izeau.rev.response.type
by @herudi.Published by herudi 11 months ago
feat(lib/logger): color INFO and ERROR message in term for Node/Bun.
Published by herudi about 1 year ago
rev
to method-decorators #47Published by herudi about 1 year ago
Node
directly #46Published by herudi about 1 year ago
helmet.render
by @herudi