Noita-Together / noita-together

Play alone together
MIT License
44 stars 13 forks source link

JSON based App Settings #168

Open SamuelWhittle opened 2 months ago

SamuelWhittle commented 2 months ago

Howdy, in the pursuit of being able to self host Noita Together, I have setup a system by which the nt-app can save app settings to a JSON file.

I noticed PR #167 which would allow one to setup their own backend and auth server, and the settings I have implemented so far are for adding and managing Server "profiles".

Before the user is logged in, there is a cog in the bottom right that opens an App Settings modal where you can view the default server profile and add a new one if you want. Once logged in the cog goes away. The default server profile pulls from your environment variables.

The Cog: image

Once you click the plus you can enter your server config: image

Using this addition I able to setup the default profile (the environment variables) with default noita together server URLs and a second profile connecting to a locally hosted backend server. And I can swap back and forth by restarting (returning to the un-logged in state).