Skip to content
Sign upLog in
← Back to Community

JS more Tasks in a REPL ?

Profile icon

Hey there, I wanted to try out some HTML+CSS+JS tasks.
My idea was to create subfolders, each containing a index.html, css and js.
But it don't work. Even when I move the 3 files from root to subfolder -> nothing found.
Any idea or work flow how I can test more task (and save some) WITHOUT having a new REPL for each?
Thank you for telling me, I am newbie to this

Profile icon
Profile icon

Yes, your idea should definitely work.

Here's an example of an index.html in a subfolder:
from my replit

NOTE: For convenience of yourself and viewers, you'll probably want to have an index.html file in the root folder that links to the various subfolders. Otherwise, you'll get a error when visiting your replit's URL without the /subfolder1/ part added at the end.

The links in your root index.html file should look something like this:

<p><a href="subfolder1">Example 1</a></p> <p><a href="subfolder2">Example 2</a></p>
Profile icon

HTML Repls are only able to serve index.html in the root folder. If you set up your own backend using something like Node, you can set it to serve whatever you'd like.