Update README.md

This commit is contained in:
flopetautschnig 2023-04-24 14:21:09 +02:00 committed by GitHub
parent 921a1887c4
commit a81845fd2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,7 +28,10 @@ fn writeJson(req: Request) Response {
pub fn main() !void {
const rt = [_]Route{.{"/", index}, .{"/about", about}, .{"/json", writeJson}};
try Server.listen("0.0.0.0", 8080, &rt, allocator);
try Server.listen("0.0.0.0", 8080, &rt, allocator); // listens to http://localhost:8080
// http://localhost:8080/ "hello!"
// http://localhost:8080/about "about site"
// http://localhost:8080/json "[1, 2, 3, 4]" (JSON-Response)
}
```