Ask coding questions

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

Heya

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
Comments
hotnewtop
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.
https://replit.com/@Coder100/DarkredShadowyClient-defedfedf#index.js

JacobMcPherson1 (237)

You can use Express to make a website in node

Coder100 (18059)

Nope
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?