marcoow / rust_rest

MIT License
5 stars 1 forks source link

Convert to workspace #49

Closed marcoow closed 9 months ago

marcoow commented 9 months ago

This converts the project to a workspace – loosely based on https://github.com/SeaQL/sea-orm/tree/master/examples/axum_example

marcoow commented 9 months ago

I'm not really happy with the structure yet. While I think db and web makes sense, the fact that we also have app, cli, and config bothers me because:

So the problem is there's 5 packages but you're not supposed to touch 2 of them (app and cli) and one only exists so we're able to share 1 struct (config) and hides the actual config files 😞

LukeMathWalker commented 9 months ago

Thinking out loud:

marcoow commented 9 months ago

cli also contains the generate binary which for the moment only generates migrations but could in the long term also generate other kinds of files, a.g. a controller, etc.

I think the idea between splitting app and web was to separate the binary/main from the implementations of the web endpoints etc. but I agree there's no real value there – will merge the 2 👍