Skip to content
Sign upLog in
← Back to Community

How can I open an HTML file from the .replit file?

Profile icon
programmeruser

In

@util
's React.js template, he somehow managed to open an HTML file from the .replit file without starting a server. How can I do this in my .replit file?

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
lemme68
Profile icon
programmeruser
Comments
hotnewtop
Profile icon
Coder100

Um, static-here is how.
Here's the easy method:

run="npx static-here"
Profile icon
programmeruser

@Coder100
how did the React.js template serve static files with no server?

Profile icon
Coder100

using this ^^

@TheProgrammer3

Profile icon
programmeruser

@Coder100
but it runs a server, the React.js template just renders the HTML file and gives you unlimited uptime.

Profile icon
Coder100

not unlimited uptime

@TheProgrammer3

Profile icon
programmeruser

@Coder100
oh, that was a misconception. But is there a way to render a static site with unlimited uptime like HTML/CSS/JS repls?

Profile icon
Coder100

nope

@TheProgrammer3

Profile icon
programmeruser

@Coder100
this isn't really relevant, but how can you force the repl.it HTML view to reload?

Profile icon
Coder100

? You can't it's a bad bug

@TheProgrammer3

Profile icon
SixBeeps

Can you link me to the template? I should be able to dissect it from there.
(Also

@util
is not a person, but an account used by the Repl.it team to do stuff)