Skip to content
/ tiny Public

A Koa-like HTTP server wrapper on top of node:http

Notifications You must be signed in to change notification settings

Absesay/tiny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny

A Koa-like middleware server built on top of node:http.

Usage

import { createApp, logger, jsonBody } from "tiny";

const app = createApp();

app.use(logger());
app.use(jsonBody());

app.router.get("/health", (ctx) => ctx.text("ok"));

app.router.post("/echo", (ctx) => {
  ctx.json({ got: ctx.request.body });
});

app.use(app.router.routes());

app.listen(3000);

About

A Koa-like HTTP server wrapper on top of node:http

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published