haskellgoogle-cloud-platformhaskell-stackhaskell-snap-framework

Unable to connect externally to Snap application running on google cloud


I'm trying to run my project on google cloud. The server is run with quickHttpServe which runs on http://0.0.0.0:8000. I've ssh'ed into my cloud instance, cloned my repo, install stack, built the project, and able to run it on the cloud instance.

It works fine on my local machine and am able to receive html file from the server on http://localhost:8000 but not on http://<my cloud instance external ip>:8000.

I'd like to be able to go to http://<my cloud instance external ip>:8000 and be served a html page as how it works when i run it locally on my machine.


Solution

  • Adding a firewall rule under the VPC network tab in google cloud for ip range 0.0.0.0/0 for tcp:8000 seems to solve the issue.