You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Not a problem, simply would be nice to use the loco CLI to generate entities to a separate crate in teh workspace. The reason here is I'm trying to write a front end in Dioxus or some other wasm based front end system. I can already override the static server to be another folder in the workspace based on my research, but it'd be great to reuse the same entity structures on the front end!
I think I can do this if I just generate entities with the sea-orm cli, but the entities automatically created by the cli migrate command aren't included in that.
Describe the solution you'd like
just a CLI flag to specify an output directory so I can point it to my workspace (or a config file...I know I know convention over configuration, I'm open to any solution here).
Describe alternatives you've considered
I could manually manage this so my front end depends on a mutual crate as my backend, but it'd be great if loco knew about this potential use case :)
The text was updated successfully, but these errors were encountered:
I think this structure could also work for me and avoid needing this so I wonder what you think:
loco-app/
Cargo.toml
config/development.yml -- modified to point to target/dx/... for static serving
dioxus-frontend/
Cargo.toml
dioxus-server-fns/
Cargo.toml
Dioxus FE depends on Dioxus Server Fns
Dioxus Server Fns Depends on Loco App library (for entities) and injects its created routes/services somehow before initializers are called? (not sure this is actually possible).
Another solution is:
Make 3 crates:
loco
dioxus
main
Main also defineds a MainApp which wraps App and defines Hooks and adds the dioxus hook as well, not sure if this works but seems ok. This way loco can stay unchanged. If this works maybe it'd help someone else to document it. I'll check when i get a chance
Feature Request
Is your feature request related to a problem? Please describe.
Not a problem, simply would be nice to use the loco CLI to generate entities to a separate crate in teh workspace. The reason here is I'm trying to write a front end in Dioxus or some other wasm based front end system. I can already override the static server to be another folder in the workspace based on my research, but it'd be great to reuse the same entity structures on the front end!
I think I can do this if I just generate entities with the sea-orm cli, but the entities automatically created by the cli migrate command aren't included in that.
Describe the solution you'd like
just a CLI flag to specify an output directory so I can point it to my workspace (or a config file...I know I know convention over configuration, I'm open to any solution here).
Describe alternatives you've considered
I could manually manage this so my front end depends on a mutual crate as my backend, but it'd be great if loco knew about this potential use case :)
The text was updated successfully, but these errors were encountered: