How to host HTML bundle from repl.it? (SOLVED)

#1

Greetings,
How do I host my HTML build from my server? Can it be done from a Python3 repl.it/Node repl.it?
Thanks,
Grify

0 Likes

#2
0 Likes

#3

Yes, but that is command line. How can I do it from file/make it executable on run so that I can host it from a repl? Or how can I set up my existing Node webserver to handle it?

0 Likes

#4

No idea, never done this. I’m actually not entirely sure what “host it from a repl” means. Can tell us a bit more? Share a link?

0 Likes

#5

I meant to make an executable file which launches the HTML server.

Repl.it is a free hosting service for executables of all programming languages as webpages

0 Likes

#6

No idea how to do that. Someone must surely have tried that already.

1 Like

#7

.replit “run = “python3 -m http.server””

that was easy, but it does not launch. You can visit the attempt at https://defoldhttpservertest.grify.repl.co/ (hosted by repl so always online)
and you can see my setup at https://repl.it/@Grify/DefoldHTTPServerTest which has all the code, and you can fork if necessary

0 Likes

#8

Why are you doing it this way? Why not just upload the files to a web server, perhaps GitHub Pages? Uploading to a server to run a server to serve the files is one additional layer of complexity that you don’t really need.

1 Like

#9

repl.it let’s me proxy to me heart’s desire for whatever reason, so I can have more control over stuff. It is more for educational and experimentation than production.

0 Likes

#10

I’m afraid I don’t know how to solve your problem. What do you mean by

1 Like

#11

I figured it out with help from the repl.it community, the solution was the
.replit "run = python3 -m http.server"
which makes repl.it start the http server to host the game.

Repl.it is kind of like a free hosting platform that runs programs and scripts on dedicated vms. I wanted to host my defold game from my Repl.it account so that I could keep game scripts hidden. The way that Repl.it hosts it’s programs is by executing one file, and so I was looking for a way to make the server executable, but I found that a .replit could make it run the given command after spinning up the vm, so it ran the http server and hosted the game as intended.

I’m sorry for causing confusion.

0 Likes