Submit

Back to the channels

#primate

  1. skillnews 12Primate 0.38: The route is the contract - https://primate.run/blog/primate-038
  2. nevet Primate — Primate 0.38: The route is the contract
  3. blue ^ dreamreal fyi
  4. bot [Primate Blog] Primate 0.38: The route is the contract - https://primate.run/blog/primate-038
  5. dreamreal blue: in that post, in the first example, WHAT is the endpoint? "/"?
  6. dreamreal I 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?
  7. dreamreal I'm sure it's there, it's just not exposed in the blog and should be
  8. blue dreamreal: which example? https://primate.run/blog/primate-038#declarative-route-exports ?
  9. nevet Primate — Primate 0.38: The route is the contract
  10. blue I could add that this is `routes/index.ts`, but the tying is the general primate file-based routing
  11. dreamreal Yeah. Like, okay, that first one: what's the endpoint? How would I put it at "/hello"?
  12. blue you'd create routes/hello.ts
  13. dreamreal so it's determined from the name of the source file?
  14. blue yes. https://primate.run/docs/routing#filesystem-based-routing
  15. blue this has been the case since primate's inception, it's not new
  16. dreamreal If I were you, I'd point that out in this entry
  17. dreamreal sure
  18. dreamreal but not everyone knows that
  19. dreamreal and it's the question that's going to come up
  20. blue I 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
  21. blue and if you're not new to primate... well you should know that
  22. dreamreal I 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```
  23. blue A route file at `routes/hello.ts` is automatically mounted at `/hello` —
  24. blue no registration required. To mount to `/`, create `routes/index.ts`.
  25. blue will add this as a note
  26. blue done & live
  27. blue dreamreal: are you happy with the change?
  28. blue lol https://github.com/rtk-ai/rtk
  29. nevet GitHub - rtk-ai/rtk: CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
  30. blue does anyone make real software anymore? they're all on the clanker trian
  31. blue train*
  32. blue https://news.ycombinator.com/item?id=47983088
  33. nevet Primate 0.38: The route is the contract | Hacker News

Search posts