Why is the IDE preview blank?
I am making a NodeJS Express app and the preview in the IDE is blank even though I can see it in my browser.
The problem only happens if I use helmet.
Voters
I am making a NodeJS Express app and the preview in the IDE is blank even though I can see it in my browser.
The problem only happens if I use helmet.
You need to listen on 0.0.0.0 instead of localhost.
@xfinnbar I found the solution myself, but how do I do that on replit? Just curious.
Solution:
Not a Node guy myself, but in Python Flask you use
app.run("0.0.0.0")
@SockedOhh, I’ve never used Python at all. In Node I just do
@xfinnbar
Node must listen on 0.0.0.0 by default. In Python and a lot of other languages, localhost is default. @Socked