Ask coding questions

← Back to all posts
Adding a Website to a Node.js Replit
Crispyyy (1)


So I have a Node.js Replit and I want to host a website in it, I have done it before but it's not working. What do I do?

Answered by Coder100 (18059) [earned 5 cycles]
View Answer
Coder100 (18059)

Just put all you web code into the public folder, and use it normally, do not include the public folder when referencing a file.

JacobMcPherson1 (237)

You can use Express to make a website in node

Coder100 (18059)

You can't just add nodejs to a website, you have to do it the other way
Add website to nodejs

xXJohnDoeXx (6)

Could you show me an ss of the index.js file?