Comment

Comment by PontifexMinimus

From https://fresh.deno.dev/docs/getting-started/create-a-route :

> Routes are defined as files in the routes directory. [...] If the file name is contact.js and is placed inside of the routes/about/ folder, the route will handle requests to /about/contact.

I can't say I'm particularly keen on being told what directory to put files in, or or being told that I must only code exactly one endpoint in each file. Why aren't I allowed to code multiple endpoints (e.g. for related functionality) in the same file?

Also, in what directory do I put my files if the url is of the form /user/{username}/page/{pagename} ?

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton