JSON File Reloading


#1

Hello,

In my JavaScript code I have a command that writes to a .json file and it works on my pc live. On glitch.com I have to type “refresh” in the console everytime, can I do this automatically ?

Thank you!


#2

Hi :slight_smile:

it works on Glitch too, but the editor is not enabled to show changes to files that happen automatically, that’s why you need to use refresh to see the changes. But they happen anyway. If you want to see the content of the file, you might configure a route in your webapp that serves the file content… if you want some security, you can put it behind a basic auth wall.


#3

OHHH,

Thanks man makes sense :slight_smile: