microsoft / dev-proxy

Dev Proxy is an API simulator that helps you effortlessly test your app beyond the happy path.
https://aka.ms/devproxy
MIT License
471 stars 56 forks source link

[Feature Request]: Add Timer/Time Out option to stop dev proxy #845

Open OnurGumus opened 1 month ago

OnurGumus commented 1 month ago

It would be nice to add some sort of timer, that devproxy stops itself after that time passes as an additional safety net where it can be left open, in particular in CI/CD scenarios.

devproxy --timer 180  
// will stop dev proxy after 3 minutes
waldekmastykarz commented 1 month ago

Thanks for the suggestion @OnurGumus. Could you give us some more information behind the thinking and how you'd prefer this over explicitly closing proxy by sending a SIGINT?

OnurGumus commented 1 month ago

Hi,

I was thinking something like timeout command on linux. But perhaps triggers if there are no requests for given duration. It's a sort of safety net against devproxy left open.

waldekmastykarz commented 1 month ago

Thanks for clarifying. Nice suggestion!