Skip to content
← Back to Community
Adding a Website to a Node.js Replit
Profile icon
h
has Hacker Plan
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?
screen1
screen2

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

Profile icon
JacobMcPherson1

You can use Express to make a website in node

Profile icon
Coder100

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

Profile icon
xXJohnDoeXx

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