Describe the bug
I was playing around with the configuration and changed the port of the proxy to 3002. Despite doing this I still got the "Starting application at http://127.0.0.1:3000" log message at the start. It turns out that no matter what the configuration is this message will always display. This occurs for both Olympus and proxy.
Looking into this further it appears to be because the buffalo option of Addr but not Host is not given.
app := buffalo.New(buffalo.Options{
Env: ENV,
PreWares: []buffalo.PreWare{
cors.Default().Handler,
},
SessionName: "_athens_session",
Logger: blggr,
Addr: conf.Proxy.Port,
})
To Reproduce
Change the Port variable in the configuration file and start the server.
Expected behavior
I expected the log to be consistent with where the server actually binded to.
Environment (please complete the following information):
Discussion
I can provide the PR fixing this but I was wondering how we should handle the "Host" buffalo option. Should it be an extra configuration? Or should something else be done?
@zkry I think that the best thing is to use the "Host" buffalo option, and change the "Port" option to not have the : prefix.
@rchakra3 you did almost all of this config work, what do you think?
@arschles I agree that seems the best way to do it!
This to me sounds like a Buffalo bug rather than an Athens one.
The Go convention (in the std lib and others) is that you provide the Port as colon-prefixed string and so you can do http.ListenAndServe(":3000", nil).
So Buffalo should be able to handle this.