Ask coding questions

← Back to all posts
hosting chat on repl
tickedoffsquid (16)

Hello! I am currently making a small chat with repl.it, originally i was running with localhost, and trying to run on my ip, but neither of those allowed connections from other devices... do I really have to buy a domain for this, or is there an easier way to actually load the index (whats happening on repl, index doesn't load)

Answered by EpicGamer007 (1605) [earned 5 cycles]
View Answer
Comments
hotnewtop
EpicGamer007 (1605)

you are running index.js right now. create a file called .replit and type in node server.js. that should work

EpicGamer007 (1605)

Also, after you set up the .replit file, you can remove index.js by typing rm index.js in the console.

tickedoffsquid (16)

@EpicGamer007 if i put node server.js, i get the error unable to read .replit: unable to decode .replit: Near line 1 (last key parsed 'node'): expected key separator '=', but got 's' instead

tickedoffsquid (16)

nevermind, solved that, now it just shows blank.

EpicGamer007 (1605)

@tickedoffsquid oh wait i just saw your code, you need to get a web server running, if you invite me to the repl, i can get it fixed for you