Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mockoon-cli live update #665

Open
AKABTB opened this issue Jun 9, 2021 · 10 comments
Open

mockoon-cli live update #665

AKABTB opened this issue Jun 9, 2021 · 10 comments
Labels
App: CLI Issue is for the CLI feature New feature request good first issue Good for newcomers

Comments

@AKABTB
Copy link

AKABTB commented Jun 9, 2021

When I am updating the data file, I want mockoon-cli to sense the changes in real time, without restarting the service, like client software does.

@255kb
Copy link
Member

255kb commented Jun 9, 2021

Thank you for opening the issue @AKABTB. I would kindly ask you to follow the issue template next time.

@255kb 255kb added the feature New feature request label Jun 9, 2021
@theo-staizen
Copy link

I would also like this feature, if possible. Perhaps through a --watch flag?

@255kb 255kb transferred this issue from mockoon/cli Mar 28, 2022
@255kb 255kb added the App: CLI Issue is for the CLI label Mar 28, 2022
@benlei-gfm
Copy link

benlei-gfm commented Jul 20, 2022

I'm trying to compare mock-server and mockoon, and it seems like mock-server has this feature built in.

Would be great to have this also in mockoon to make it a stronger choice.

I've also noticed that the UI doesn't watch the settings file. As such if I were to make modifications to a route directly on the file, the Mockoon UI wouldn't be aware of it. Then if I do make a modification with the Mockoon UI, it overwrites/loses my manual change.

@255kb
Copy link
Member

255kb commented Jul 21, 2022

@benlei-gfm

I've also noticed that the UI doesn't watch the settings file. As such if I were to make modifications to a route directly on the file, the Mockoon UI wouldn't be aware of it. Then if I do make a modification with the Mockoon UI, it overwrites/loses my manual change.

This has been added in v1.19.0. You must enable it in the settings.
image

@benlei-gfm
Copy link

I actually just found that out - kind of weird that it's disabled by default though...

@vltansky
Copy link
Contributor

Where can i find this settings? @benlei-gfm @255kb

@255kb
Copy link
Member

255kb commented Aug 16, 2022

Where can i find this settings? @benlei-gfm @255kb

@vltansky This setting is only for the UI (ctrl+, or top menu, Application -> settings). The CLI currently offers no monitoring.

@avrezvanov
Copy link

I want this opportunity too. Automatic restart of the CLI.

@wilcorrea
Copy link

Hey guys. Do you have plans to "live update" feature? Can we help on it?

@255kb
Copy link
Member

255kb commented Dec 23, 2022

Hey guys. Do you have plans to "live update" feature? Can we help on it?

Sure, any help is welcomed. Let me know if you want to work on it, we can discuss the implementation as there are multiple use cases to cover:

  • running the CLI with --daemon-off (foreground process)
  • running the CLI without --daemon-off (PM2 managed process). Can we monitor correctly? Not sure.
  • running the CLI within Docker:
    • with the provided Docker image, data file is passed at runtime.
    • with a custom Docker image, data file copied inside the container (maybe easier).

And for all theses cases, a path to a local data file can be passed as a param, or a URL. Do we monitor URLs by using some polling? Or do we exclude them from the feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App: CLI Issue is for the CLI feature New feature request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants