https://github.com/andrei-markeev/express-mini
Minimalistic express-like webserver with zero dependencies
https://github.com/andrei-markeev/express-mini
expressjs http-server nodejs web-server
Last synced: 2 months ago
JSON representation
Minimalistic express-like webserver with zero dependencies
- Host: GitHub
- URL: https://github.com/andrei-markeev/express-mini
- Owner: andrei-markeev
- Created: 2022-11-12T13:59:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-09-20T19:38:09.000Z (9 months ago)
- Last Synced: 2025-09-20T21:23:57.487Z (9 months ago)
- Topics: expressjs, http-server, nodejs, web-server
- Language: TypeScript
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## express-mini
Minimalistic Express-like web server with zero dependencies.
### Installation
```
npm i @andrei-markeev/express-mini
```
### Usage
```ts
import * as app from "@andrei-markeev/express-mini"
app.get("/hello", async () => ({ text: "Hello world!" }));
app.get("/test", async () => ({ html: "
Test
" }));
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`.