api-testing icon indicating copy to clipboard operation
api-testing copied to clipboard

Add a flag to enable/disable reload mock config automatically

Open LinuxSuRen opened this issue 1 year ago • 1 comments

The Mock Server can only read the config at the startup stage. Users need to restart it if they modified the config file content.

Solution

Support to watch the changes of the mock config file. And provide a flag to enable or disable this feature. The usage might be:

atest mock --files demo-server.yaml --auto-reload [true|false]

And I prefer setting the flag value --auto-reload to be false.

References

  • https://medium.com/@skdomino/watch-this-file-watching-in-go-5b5a247cf71f

LinuxSuRen avatar Apr 28 '24 08:04 LinuxSuRen

/assign @yuluo-yx

yuluo-yx avatar May 01 '24 14:05 yuluo-yx