feat: initial test static site with Deno backend
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// GET /api/time — returns the current server time.
|
||||
export async function API_get(req: Request): Promise<Response> {
|
||||
const now = new Date();
|
||||
|
||||
return Response.json({
|
||||
time: now.toISOString(),
|
||||
unix: Math.floor(now.getTime() / 1000),
|
||||
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user