JSON File Reloading

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!

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.

OHHH,

Thanks man makes sense :slight_smile:

1 Like