feat: add TypeScript server skeleton

This commit is contained in:
2026-06-07 12:18:00 +02:00
parent 28c91a4b0e
commit cc5a567335
4 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import type { IncomingMessage, ServerResponse } from "node:http";
export function createRequestHandler() {
return async function handleRequest(_req: IncomingMessage, res: ServerResponse) {
res.statusCode = 200;
res.setHeader("content-type", "application/json; charset=utf-8");
res.end(
JSON.stringify({
name: "mapy-mg",
status: "ok",
features: [
"photo upload",
"EXIF location extraction",
"map markers",
"route preview"
]
})
);
};
}