Community
Chat Logs
Friday, May 1, 2026
- skillnews12Primate 0.38: The route is the contract - https://primate.run/blog/primate-038
- nevetPrimate โ Primate 0.38: The route is the contract
- blue^ dreamreal fyi
- bot[Primate Blog] Primate 0.38: The route is the contract - https://primate.run/blog/primate-038
- dreamrealblue: in that post, in the first example, WHAT is the endpoint? "/"?
- dreamrealI like the expression of get/post/head/patch as functions in the route - that makes sense, I like that a lot. But where's the tying of the route to the endpoint? how do I see 'this route is mapped to /hello' or whatever?
- dreamrealI'm sure it's there, it's just not exposed in the blog and should be
- bluedreamreal: which example? https://primate.run/blog/primate-038#declarative-route-exports ?
- nevetPrimate โ Primate 0.38: The route is the contract
- blueI could add that this is `routes/index.ts`, but the tying is the general primate file-based routing
- dreamrealYeah. Like, okay, that first one: what's the endpoint? How would I put it at "/hello"?
- blueyou'd create routes/hello.ts
- dreamrealso it's determined from the name of the source file?
- blueyes. https://primate.run/docs/routing#filesystem-based-routing
- bluethis has been the case since primate's inception, it's not new
- dreamrealIf I were you, I'd point that out in this entry
- dreamrealsure
- dreamrealbut not everyone knows that
- dreamrealand it's the question that's going to come up
- blueI will grant you that and add it. however: every blog post says, "if you're new to primate, read this", and the file-system based routing is the first thing explained there
- blueand if you're not new to primate... well you should know that
- dreamrealI hear you, but I'd still include a nod to it: "```typescript\n# this might be routes/hello.ts, so the url would be http://.../hello\n```
- blueA route file at `routes/hello.ts` is automatically mounted at `/hello` โ
- blueno registration required. To mount to `/`, create `routes/index.ts`.
- bluewill add this as a note
- bluedone & live
- bluedreamreal: are you happy with the change?