I’m working on a r/place I forked and everything was going well until I realized my project doesn’t actually keep the website online forever. I have the Repl on always online too.
To start the website, I go into the shell and run this command:
./place -root ~/NewTest/place/web/root -load place.png
(You would run a different command if it’s your first time)
When I then close the Replit tab, the entire website itself turns off. Any ideas to how I could fix this?
Try setting the command as the run command in the
.replit file. (processes in shell tabs are terminated when you close the tab)
Replit Always On does not keep Repls awake 24/7, instead, when your Repl goes to sleep, it will immediately wake back up with Always On.
They were running it from the shell tab, so it was exiting when they closed the page
So would I turn
run = ["./main"]
entrypoint = "main.go"
run = ["./place -root ~/NewTest/place/web/root -load place.png"]
entrypoint = "place/cmd/place"
run = "place/cmd/place -root ~/NewTest/place/web/root -load place.png"
entrypoint sets the file displayed by default, not the initial directory)
place/cmd/place/main instead of
Can you run
ls place/cmd/place and show us the output?
place/cmd/place/place instead. You may need to run
chmod +x place/cmd/place/place if it’s not working.
Sorry, I missed that. Try @youngchief 's suggestion
place/cmd/place/place -root ~/NewTest/place/web/root -load place/cmd/place/place.png.
Now if I were to close Replit, would this stay?
If you encounter any more issues. Feel free to ask for help!
Yes. (Try it, it should work)
Just wondering, how much disk space is your repl using? I’d love to try deploying that on my website