eden/treaty/overview #641
Replies: 5 comments 10 replies
-
|
what about /:param1/:param2 ? Eden treaty doesn't work for that i think. |
Beta Was this translation helpful? Give feedback.
-
|
This seams work well in monorepos. But there is any possibility to fetch this, like we do with types in graphql? |
Beta Was this translation helpful? Give feedback.
-
|
Hey folks, what about if the elysia backend is on another repo? |
Beta Was this translation helpful? Give feedback.
-
|
What should I do if I want to use Eden Treaty in a multi-repository setup following best practices, where the frontend and backend are deployed on separate cloud environments? ├── backend/ ← Backend repository |
Beta Was this translation helpful? Give feedback.
-
|
I'd like to add a tip here, if you're trying to use Elysia in a monorepo with a vite app as the client, DON'T export your types on the same file you define your API (generally index.ts). Always something like "type.ts" where you have something like: type.tsimport type { app } from "./index";
export type App = typeof app;package.json{
"...": "rest",
"exports": {
".": "./src/type.ts"
}
}The reason for that is that at the moment of resolving modules for the frontend, the bundler might end up trying to resolve the runtime modules of your backend, that's not a problem all the time but if you use something like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
eden/treaty/overview
A VitePress site
https://elysiajs.com/eden/treaty/overview
Beta Was this translation helpful? Give feedback.
All reactions