feat(examples): add aira_test_serve.aira micro-webserver showcase
This commit is contained in:
1 parent
cf9afe103a
commit
1d7fa8b9ee
1 file changed
+12
@@ -0,0 +1,12 @@
|
|||||||
|
import "serve";
|
||||||
|
|
||||||
|
serve.route("/api/hello", fn(req) {
|
||||||
|
return {
|
||||||
|
"status": "ok",
|
||||||
|
"message": "Hello from AiraLang Web Engine!",
|
||||||
|
"client_path": req["path"]
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
# Start HTTP server on port 8080
|
||||||
|
serve.start(8080);
|
||||||
Reference in new issue
Block a user