middlewarehq / middleware

✨ Open-source DORA metrics platform for engineering teams ✨
https://middlewarehq.com
Apache License 2.0
1.16k stars 100 forks source link

Enable Hot-reload for CLI #423

Open samad-yar-khan opened 5 months ago

samad-yar-khan commented 5 months ago

Why do we need this ?

Acceptance Criteria

Further Comments / References

VipinDevelops commented 3 months ago

Hey @samad-yar-khan Can you explain this issue in more detail

Currently we build and start the CLI its like starting point of the development server that handles everything and we have dev script in the CLI if someone want to run that in watch mode with hot reload.

so Can you please explain what are we trying to achieve here ?

jayantbh commented 3 months ago

@VipinDevelops this issue basically meant that when you're working on a change in the CLI itself, instead of shutting down and restarting all changes, it should have a live-reload functionality similar to how you'd have experienced in the usual UI dev.

VipinDevelops commented 3 months ago

Hey @jayantbh Thanks for explaining, but we already have a dev scripting in the CLI that can run it with hot reload.

Here is the Dev Script which run CLI with Watch Mode.

jayantbh commented 3 months ago

@VipinDevelops does it actually work like live-reload for you? Because it seems to basically trigger a whole-app-reload for the CLI for me on changes.

VipinDevelops commented 3 months ago

So @jayantbh correct me if I am wrong we want to make a feature that lets use inject updated source code into a running app without a restart

jayantbh commented 3 months ago

Correct. The running app here is the CLI app. Not the frontend or backend code.

VipinDevelops commented 3 months ago

Got it and that code with run other services thanks for explaining I will try to explore potential solutions for this.