"Failed to start" but server seems to be running

Hi! I have a simple project here:

https://homebridge-slackin.glitch.me

It just installs slackin from npm, then runs it with some environment vars defined. Looking at the logs, the server seems to be running fine:

listening on 18f2b5f2a7ba:3000

But visiting the site shows “failed to start application”. I’m wondering how Glitch decides when the application is running successfully? Perhaps slackin (which uses Express internally) isn’t behaving in a way Glitch likes?

Hi @nfarina I think the problem that you’re running into is that Glitch expects to be listening to localhost on port 3000. It looks to me from a very quick review that slackin is getting the hostname internally somehow (I didn’t dig too deeply into where that’s coming from). I believe you can get around that by passing the hostname parameter value of “localhost” in your start script invocation in package.json.

Let us know if that fails to help things along!

That did the trick! Very strange. I thought it defaulted to 0.0.0.0 but apparently not. Or maybe it’s an ipv6 thing. Anyway thanks so much for the help!