https://github.com/peterdee/deno-simple-server
A very simple HTTP server with Deno and a single worker
https://github.com/peterdee/deno-simple-server
deno server
Last synced: 2 months ago
JSON representation
A very simple HTTP server with Deno and a single worker
- Host: GitHub
- URL: https://github.com/peterdee/deno-simple-server
- Owner: peterdee
- Created: 2020-05-17T00:23:47.000Z (about 6 years ago)
- Default Branch: develop
- Last Pushed: 2020-05-17T17:15:12.000Z (about 6 years ago)
- Last Synced: 2025-03-14T16:49:13.166Z (over 1 year ago)
- Topics: deno, server
- Language: TypeScript
- Homepage: http://localhost:1111
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## deno-simple-server
A very simple HTTP server with Deno and a single worker
The server will be launched on the `1111` port
You can launch the server on any port if you specify it:
```shell script
export PORT=1111
```
### Deploy
```shell script
git clone https://github.com/peterdee/deno-simple-server
cd ./deno-simple-server
```
### Launch
```shell script
deno run --allow-net --allow-env --allow-read --unstable server.ts
```
### Benchmarking
Tested with [`wrk`](https://github.com/wg/wrk)
```text
peter: ~/Playground $ wrk -c 100 -d 30 -t 4 http://127.0.0.1:1111
Running 30s test @ http://127.0.0.1:1111
4 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 3.63ms 1.92ms 108.65ms 91.56%
Req/Sec 6.99k 813.61 8.20k 87.42%
835261 requests in 30.02s, 50.18MB read
Requests/sec: 27826.33
Transfer/sec: 1.67MB
```