Skip to content
Snippets Groups Projects
Commit a81aea10 authored by Alexander Harkness's avatar Alexander Harkness
Browse files

Hotfix deployment server

parent 996ae58e
No related branches found
No related tags found
1 merge request!15Hotfix deployment server
Pipeline #100958 passed
......@@ -3,7 +3,7 @@ import http from "http"
import process from "process"
import signalbuddy from "signalbuddy"
const host = "127.0.0.1"
const host = "0.0.0.0"
const port = process.env.PORT || 3000
const app = express()
......
  • Maintainer

    @alh1717 0.0.0.0 Doesn't work on Windows :(

    (The server starts properly on localhost because node translates it, but you can't browse to it by that name so the terminal link is broken.)

    What was the problem? Would localhost work?

    Edited by Nayeem Rahman
  • This is only a hotfix. The issue is that setting the host to 127.0.0.1 or localhost means only connections from localhost can access the server. Obviously this doesn't work for the deployed server - we want all of the internet to be able to connect. 0.0.0.0 is a pseudo-IP that means allowing connections from all interfaces.

    Really we need to decouple the binding address (0.0.0.0 for deployment and 127.0.0.1 for development) from the access address (eventually this might be a hostname rather than an IP).

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment