crazy2be / buildblast

Build a base, shoot intruders
MIT License
5 stars 1 forks source link

Strange config vodo needed to get server running on a clean install #189

Open crazy2be opened 4 years ago

crazy2be commented 4 years ago

Ideally, we should be able to run the server component of this project without having to involve the www/website component at all. I'm having a hard time remembering how this all works, but I think the website is supposed to set up a config for servers that it creates?

In any case, even if we read from a config file, it shouldn't be necessary to have one in order to get a new server up and running. Command-line arguments should be available to set listening address and port. Server should know where the client directory is either by itself, or by being told by the build script. You should be able to clone, run ./runserver, and have a working server. Changing the listening port / address should be ./runserver 159.65.77.62:80 or similar

Instead, I found I had to create the following config to run the server in production:

client/server_config.default.json:

{
        "Host": "159.65.77.62",
        "Port": 79,
        "client_assets": "/root/src/buildblast/client/"
}

This is gross because:

A somewhat related issue, but it would be nice to have the website stuff in a separate folder entirely from the rest of the code. Both to provide and encourage a healthy separation from the regular server.