mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-17 01:59:08 +00:00
initial port to cfworkers i guess
This commit is contained in:
parent
ab9fe30b42
commit
9eeb946389
37 changed files with 367 additions and 1098 deletions
14
src/backend-worker/index.ts
Normal file
14
src/backend-worker/index.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { BotJoin } from './handlers/bot-join';
|
||||
import { LoginBounce } from './handlers/login-bounce';
|
||||
import { LoginCallback } from './handlers/login-callback';
|
||||
import { Router } from './router';
|
||||
|
||||
const router = new Router();
|
||||
|
||||
router.add('GET', 'bot-join', BotJoin);
|
||||
router.add('GET', 'login-bounce', LoginBounce);
|
||||
router.add('GET', 'login-callback', LoginCallback);
|
||||
|
||||
addEventListener('fetch', (event: FetchEvent) => {
|
||||
event.respondWith(router.handle(event.request));
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue