Low-level HTTP/1.1 server built directly on top of Bun.listen() TCP sockets.
This repository is maintained by Nishant Gaurav under the codewithevilxd
identity.
- GitHub: https://github.com/codewithevilxd
- Email: codewithevilxd@gmail.com
- Website: https://nishant-http-server.vercel.app
- Portfolio: https://nishantdev.space
- Incremental HTTP request parsing over raw TCP sockets
- Proper request line and header validation
Content-Lengthbody support- Branded JSON routes for
/,/health,/about POST /echoroute for quick payload testing- Bun test suite and TypeScript typecheck support
bun install
bun run start
bun run test
bun run typecheckAdditional helpers:
bun run start:udp
bun run inspect:assetGET /returns project metadata and supported routesGET /healthreturns a simple health responseGET /aboutreturns owner detailsPOST /echoechoes the request body back to the client
curl http://127.0.0.1:8080/
curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/about
curl -X POST http://127.0.0.1:8080/echo -H "Content-Type: text/plain" -d "hello from nishant"- The TCP server always responds with
Connection: close - Request bodies are decoded as UTF-8 text
- Sample raw requests live in
src/assets/