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

noxious-server as a library #15

Open
cbgbt opened this issue Aug 24, 2023 · 3 comments
Open

noxious-server as a library #15

cbgbt opened this issue Aug 24, 2023 · 3 comments

Comments

@cbgbt
Copy link
Contributor

cbgbt commented Aug 24, 2023

Is your feature request related to a problem? Please describe.
I'm currently invoking noxious-server via std::process::Command in a Rust module in my CI. This mostly works great!

I did have some issues though when debugging timing of the process coming up and successfully binding to a port, then also ensuring it is reliably killed.

Describe the solution you'd like
It might be nice to make the noxious-server package both a library and a binary, where the binary is a thin wrapper. I'm thinking that in CI, I'd have a choice to something something tokio::spawn(noxious_server.serve(...))

Describe alternatives you've considered
This isn't strictly required, and it does increase API surface of the package.

@cbgbt
Copy link
Contributor Author

cbgbt commented Aug 24, 2023

By the way, I'm happy to contribute code in general, just wanted to share some ideas I'd had while working with noxious.

@cbgbt
Copy link
Contributor Author

cbgbt commented Aug 24, 2023

I started skimming through the code and have realized that this may already be possible via core.

@oguzbilgener
Copy link
Owner

Yup, core has the server. What it doesn't have is the REST API and the store that keeps the proxies. I can definitely see the benefit of exposing the server as a library as well though.

Thank you for offering to contribute!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants