Ask coding questions

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

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 [earned 5 cycles]
View Answer
Voters
Crispyyy
Comments
hotnewtop
Coder100

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

You can use Express to make a website in node

Coder100

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

xXJohnDoeXx

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