Ask coding questions

← Back to all posts
Keeping repl permanently alive.
StringentDev

So I have been making a repl that allows you to store items online but every time, after a certain amount of time, it shuts down the express server (nodejs) and it loses all data except users that have registered. Can someone help me to keep it online (eg. An example that works)?

Thanks in advance.

Note: the server is based off lolisafe and the script is at lolisafe.js.

Edit: db is not an option and uptime robot lasts 2 months.

Voters
cdCreepArghhh
Tronic247
IDXSLeague
dagumatisainath
FlamingoPlays
Diegomcha
aGEEKdude
dudeactualdev
hg0428
EBMOfficial
Comments
hotnewtop
[deleted]

use this:
ping.mat1.repl.co
just enter in the url, and ill keep the site up

StringentDev

thanks it actually worked! @TaylorLiang

Pandapip2

If you can force the repl to crash using kill 1 when the repl crashes, then using the url ping.mat1.repl.co/__tail should turn the repl back on. Just have the repl run "kill 1" on exit, e.g. have a bash script that looks like this:
node main.js >> main.log
kill 1

StringentDev

thanks for the heads up! @Pandapip2

DeBeast591

@TaylorLiang could pinging the site for a long time cause it to crash or be shut down by repl.it?

[deleted]

@DeBeast591 Nope. I had a site that I pinged for around 4 months. Didnt crash once

DeBeast591
StringentDev

mine is that all over @DeBeast591

5alidshammout

thaaaaaaaaanks

AkshitRai

thanks man you are awesome

LuuNoo

thank you it works !

StringentDev

@LuuNoo Seems that the website is not active often, leading to errors occasionally. You could try freshping.

(HOW is this post still alive!)

JaySmith11

Nonetheless, save a few hours toward the beginning of the day and evening for continuous work. What's more, however telecommute is about adaptability, attempt to begin and complete (!) your day on time too.Setting cutoff times for message answers and following your group's movement is OK; actually, mind the management level. Individuals aren't robots to sit before the screens for 8 hours and reply in practically no time, however you can here and there require prompt answers. Indeed, if so – simply call, don't message. Also, attempt to try not to be excessively official at calls – side remarks and jokes assist with making the air less tense.Working from home requires a progress to computerized reality from each business cycle player. Furthermore, project supervisors face considerably more difficulties since pioneers need to discover better approaches to work together with their groups, partners, and customers, you can always read interesting post for more details about IT world and trends.However, boosting your usefulness is conceivable – with new ways to deal with correspondence and fair programming. Mechanization stages offer a lot of phenomenal components that can be fused into your work process with the assistance of a Salesforce senior. Along these lines, come into the new world!

StringentDev

@JaySmith11 Well yes ik about that.

Coder100

Try to make sure there are no errors first. Right now, there is a deprecation error.

StringentDev

@Coder100 it still works.

StringentDev

No I have to reboot, hard restore @Lethdev2019

Coder100

It doesn't matter if it works or not, if there is a warning, it will be potentially fatal. @Lethdev2019

RohilPatel

Well, if you have items you need to save, you could use fs, which won't get rid of the sleeping part, but will store the data.

Coder100

That won't work. @RohilPatel

Coder100

He already has the DB up, and in theory it should work, but REPL.IT has limitations @RohilPatel

RohilPatel

Oh, ok. @Coder100

RohilPatel
Coder100

Why did u say ok twice >:( @RohilPatel

RohilPatel

Cuz u had 2 messages. @Coder100

SixBeeps

Either use a DB (the best option) or use UptimeRobot (another viable option, but I'd use this if absolutely necessary)

StringentDev

Looking for a solution that lasts forever not two [email protected]

StringentDev

It's the fact it does not save files @SixBeeps
[Edit] not fully

SixBeeps

@Lethdev2019 UptimeRobot lasts forever

StringentDev

Not the free plan. Unless you want people to pay for a was meant to be free service. @SixBeeps

SixBeeps

@Lethdev2019
are you talking about this?

StringentDev

Yes, plus the credits that you [email protected]

SixBeeps

@Lethdev2019 Okay, so here's the thing: those are logs. Basically, UTR keeps logs of each ping so that you can have a history of each ping's response. For your purposes, you do not need logs. It will keep pinging your site (keeping it alive) forever.

StringentDev

Ill give it a try. @SixBeeps

StringentDev

It's not lettin me put in the url
@SixBeeps

StringentDev

Ok can you Tell me how to make it not log stuff. @SixBeeps

Coder100

You could turn off email responses @Lethdev2019

StringentDev

How does that affect how long the server lives? @Coder100

StringentDev

It still logs at the dashboard @Coder100

Coder100

What dashboard? @Lethdev2019

Coder100

The uptimerobot one? @Lethdev2019

Coder100

Yeah, it's supposed to do that, it's to monitor uptime, and since it always pings the website, it has the benefit of keeping it alive. @Lethdev2019

StringentDev

Actually, looked up stuff (tried similar ideas as well) half the time it does not work or the repl become unstable @Coder100

SixBeeps

@Lethdev2019 UTR works perfectly fine for me (using a Django program)

StringentDev

Im using node.
@SixBeeps

SixBeeps

@Lethdev2019 Either way, they're both web repls.

Coder100

The REPL becomes unstable because there is an error. @Lethdev2019

StringentDev

@Coder100 well I cant launch it anymore due to something happening

StringentDev

Update
Redeploying my [email protected]

StringentDev

atually, i found mine is very stable to the point i can safley say that i could go to sleep and 1 day later, it is still running. @Coder100