Ask coding questions

← Back to all posts
Saving Repls
gvnostler (1)

Does anyone know have to like do a storage system and have it save if you stop the code?

Answered by eankeen (605) [earned 5 cycles]
View Answer
Commentshotnewtop
eankeen (605)

hi!

not sure exactly what you mean, but there is an option to download your code

its hidden under the menu (you have to click on the 'three dots')

any code that you write will automatically be saved once you stop tying. any data that is saved will be persistent once you close the tab (meaning you will be able to see it once you visit back to the repl)

right now, no apis exist that relate to saving file. so if you were hoping to execute some javascript function when a file saved, there isnt an official and easy way to do so.

on the other hand, if you have some code that automatically writes to a file, that file will now be saved in the repl (it was recently implemented)

not sure what else you could mean, do you have any other details? :)

gvnostler (1)

Thanks! Answer I needed: "on the other hand, if you have some code that automatically writes to a file, that file will now be saved in the repl (it was recently implemented)" @eankeen

mwilki7 (192)

You want to know if repl does that or you want to know how to do that on your own machine?

gvnostler (1)

I want to know if repl can. @mwilki7

gvnostler (1)

Its crucial to my project. @gvnostler

mwilki7 (192)

@gvnostler
Yeah repl automatically saves
You can see this at the top of the coding window saved

gvnostler (1)

No i mean like if you wanted a to save a txt file when its being added to. @mwilki7

mwilki7 (192)

@gvnostler
Is this text file on your local machine or on repl?

gvnostler (1)

repl. How would I do it by machine? @mwilki7

mwilki7 (192)

@gvnostler
Anything you edit on repl, even text files, will be automatically saved on repl.
If you wanted to do it on your machine you'd probably have to find program that supports auto saving.

gvnostler (1)

If it was by code, would it save? I was testing on having it write it and it worked, but when I stopped it asked me if you want to revert back like it normally does. @mwilki7