-
Hi! Love this lil library. I'm using a durable object, so 100% of my URLs routed within that DurableObject will be prefixed with the name of DurableObject in the URL. for us, that's So, inside the Durable Object, we've got: this.router.all('/r/:roomId/*', setGlobalRoomId);
this.router.get('/r/:roomId', this.connect.bind(this));
this.router.all('*', preflight);
this.router.get('/r/:roomId/config', () => {
return this.config;
}); this works perfectly fine... but it's getting a bit tedious to rewrite Any suggestions/ideas? It seems like nested routers might not work because of the :param requirement. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
duh, it's just: router = Router({ base: '/r/:roomId' }); |
Beta Was this translation helpful? Give feedback.
duh, it's just: