Files
shiftcraft/pocketbase/sidecar/main.ts
2026-04-17 23:26:01 +00:00

14 lines
331 B
TypeScript

import { handleFcmPush } from './fcmPush.ts'
const port = Number(Deno.env.get('SIDECAR_PORT') ?? '8091')
Deno.serve({ port }, (req: Request) => {
const url = new URL(req.url)
if (req.method === 'POST' && url.pathname === '/notify') {
return handleFcmPush(req)
}
return new Response('Not Found', { status: 404 })
})