Closed bladewang closed 7 years ago
Spock internally does not look at the host name at all. I think you have two webservers running, as you can see from the Server:
headers. Only those that include Warp
are actually served by your Haskell app.
runSpock
basically calls to Warp.run port app
, using warp
directly you can customize on which hosts you would like to bind.
Take note you connect to different address there. For some reason your server only listens on IPv6 address (::1
) and IPv4 (127.0.0.1
) appears to be held by someone else.
As for the Host
question, I'd recommend using Keter to host your applications. It is super great with app reloading that you wouldn't want to implement yourself and can take care of your usual web hosting needs like static files, redirects and TLS.
@agrafix @wiz
Yes ……
That's my fault ……
~~ Thanks for you help ~~
When I run hello_spock that in https://www.spock.li/tutorial/ , I got this:
But "localhost" worked:
So, what should I do, if I want to use "foo.bar" as hostname?