From 7a77516bb6b19fd62096eadd3383843d10bee64f Mon Sep 17 00:00:00 2001 From: Yuzu Date: Mon, 13 Jul 2026 05:09:59 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20docs:=20Update=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..914c777 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# IP Test + +🌐 Minimal HTTP server that echoes your IP and request headers as HTML or JSON. + +Built with [Elysia](https://elysiajs.com/) on [Bun](https://bun.sh/). + +## Usage + +Send a request to `/`: + +- Browsers (`Accept: text/html` or `*/*`) get an HTML page listing the detected IP and all request headers. +- Anything requesting `Accept: application/json` gets a JSON body: `{ "ip": "...", "headers": { ... } }`. + +```bash +curl -H "Accept: application/json" http://localhost:3000/ +``` + +## Development + +Requires [Bun](https://bun.sh/) 1.2+. + +```bash +bun install +bun run dev # hot-reload dev server +bun run start # start the server +bun test # run tests +bun run check # typecheck + lint/format check + tests +``` + +## Docker + +```bash +docker build -t ip-test . +docker run -p 3000:3000 ip-test +``` + +## License + +[MIT](LICENSE)