0.0.9 • Published 2 years ago

@andrei-markeev/express-mini v0.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

express-mini

Minimalistic Express-like web server with zero dependencies.

Installation

npm i @andrei-markeev/express-mini

Usage

import * as app from "@andrei-markeev/express-mini"

app.get("/hello", async () => ({ text: "Hello world!" }));
app.get("/test", async () => ({ html: "<html><body><h1>Test</h1></body></html>" }));

app.listen(3000, __dirname + "/public", () => console.log("Server listens on port 3000"))

In this example, server will serve static files from the public folder (relative to the script directory).

If you don't need automatic static file serving, pass null.

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.3

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.2

3 years ago

0.0.1

3 years ago