Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs

How do I get a URL to a file inside of a repl HTML5 project? [SOLVED]


Is there a way to reference a single file inside my HTML5 project? For example, if I wanted to reuse the JS file, can I reference just the JS file inside the project? I've tried having a script tag reference the project URL, and the project URL followed by the filename, but that doesn't work; the latter gives a 404.

4 years ago
You are viewing a single comment. View All

(reply was Repl but autocorrected)

You can reference script files using <script src="the-url"></script>
To view text files, it is recommended that you use an Express.js server on to asynchronously serve the files.

Please upvote this if it helped you out 👍

4 years ago