mkeeter/pont

Project can be simplified?

Closed this issue · 2 comments

Great work, thank you!

I think that it is possible to wrap all functionality into a single executable that would (1) read the config file (2) listen on some port for HTTP connections (3) write state/DB into some file/directory (4) contain all static resources in it.

This way the project would become usable without even having nginx installed. nginx would only be optionally needed for https, if desired by the user.

Rust probably has facilities to wrap resources into an executable and to multiplex connections between two handling sub-applications.

That is certainly possible; whether it's simpler is in the eye of the beholder 😄

Adding an HTTP server to the main pont executable would increase the amount of code in the project, which makes it more complex by the metric of "code that I manage". It also commingles concerns – instead of a separate HTTP(S) file server and WebSockets game engine, they'd be muddled together in a single executable.

Finally, the flagship deploy at https://pont.mattkeeter.com uses TLS, so we'd still need NGINX as a proxy. The project is somewhat specialized to that deploy, so adding more code to handle an HTTP deploy seems out of scope.

If you'd like to try a no-NGINX flavor of the app, you're welcome to fork it, but I'm happy with the current architecture.

I meant simpler for anyone else to build/install the project. Obviously making software easier for users requires more effort.