LZulb
April 28, 2023, 2:14am
1
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:
cd place/cmd/place
./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?
9pfs1
April 28, 2023, 2:21am
2
Try setting the command as the run command in the .replit
file. (processes in shell tabs are terminated when you close the tab)
1 Like
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.
9pfs1
April 28, 2023, 2:22am
4
They were running it from the shell tab, so it was exiting when they closed the page
1 Like
LZulb
April 28, 2023, 3:01am
5
So would I turn
run = ["./main"]
entrypoint = "main.go"
Into this
run = ["./place -root ~/NewTest/place/web/root -load place.png"]
entrypoint = "place/cmd/place"
?
9pfs1
April 28, 2023, 3:03am
6
Try this:
run = "place/cmd/place -root ~/NewTest/place/web/root -load place.png"
(The entrypoint
sets the file displayed by default, not the initial directory)
9pfs1
April 28, 2023, 3:06am
8
Try place/cmd/place/main
instead of place/cmd/place
, then
1 Like
Can you run ls place/cmd/place
and show us the output?
1 Like
Try place/cmd/place/place
instead. You may need to run chmod +x place/cmd/place/place
if it’s not working.
9pfs1
April 28, 2023, 3:09am
13
Sorry, I missed that. Try @youngchief 's suggestion
1 Like
9pfs1
April 28, 2023, 3:10am
15
Try doing place/cmd/place/place -root ~/NewTest/place/web/root -load place/cmd/place/place.png
.
2 Likes
LZulb
April 28, 2023, 3:11am
17
Now if I were to close Replit, would this stay?
1 Like
If you encounter any more issues. Feel free to ask for help!
1 Like
9pfs1
April 28, 2023, 3:12am
19
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
2 Likes