sternenseemann / spacecookie

gopher library & server written in Haskell
https://sternenseemann.github.io/spacecookie/
GNU General Public License v3.0
47 stars 5 forks source link

Mode for no config file/all defaults for testing #47

Open hyperrealgopher opened 3 years ago

hyperrealgopher commented 3 years ago

Feature request.

It would be great if I could arbitrarily launch spacecookie when I build random gopherholes as a test and I just want to see what the product looks like after I build it, without having to create a config file to test locally.

I want to, for testing purposes, be able to use spacecookie without specifying a config file.

sternenseemann commented 3 years ago

I guess root should default to ./. then, but what should port default to? It would be 70 of course, but that is not helpful in your usecase because it'd require root privileges.

hyperrealgopher commented 3 years ago

How about 7070? Makes me think about how for similar purposes HTTP daemons will use port 8080. I've been personally using port 7070 for testing.

sternenseemann commented 3 years ago

Contrary to 8080 with http, 7070 has another protocol than gopher assigned to it, so it makes for a bad default. Maybe the solution is to allow specifying a subset of the configuration via command line flags.

hyperrealgopher commented 3 years ago

I don't think it'd be bad to be some preconfigured port number for testing and an option to set a flag too!