Initial commit
This commit is contained in:
13
pocketbase/sidecar/main.ts
Normal file
13
pocketbase/sidecar/main.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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 })
|
||||
})
|
||||
Reference in New Issue
Block a user