2024-07-24 20:32:08 +00:00
|
|
|
import slf4d;
|
|
|
|
import handy_httpd;
|
|
|
|
import handy_httpd.handlers.path_handler;
|
2024-07-23 21:20:10 +00:00
|
|
|
|
2024-07-24 20:32:08 +00:00
|
|
|
import model.base;
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
ServerConfig cfg;
|
|
|
|
cfg.workerPoolSize = 5;
|
|
|
|
cfg.port = 8080;
|
|
|
|
PathHandler pathHandler = new PathHandler();
|
|
|
|
pathHandler.addMapping(Method.GET, "/status", (ref ctx) {
|
|
|
|
ctx.response.writeBodyString("online");
|
|
|
|
});
|
|
|
|
HttpServer server = new HttpServer(pathHandler, cfg);
|
|
|
|
server.start();
|
2024-07-23 21:20:10 +00:00
|
|
|
}
|