fs.writeFile is works but i cant see changes in the db file, but can see in console(fs.readFileSync(...));

I was looking for answers on how to fix it, i’m found the “refresh” command, but I was tired of constantly entering the terminal. Are there any other solutions?

1 Like

where are solutions?

1 Like

Hey @LDG1 you could use Node’s child_process.exec() to run the refresh command automatically when you’ve finished your write, or intermittently as needed. Just keep in mind that refresh will trigger a restart.

1 Like

@cori how i can refresh specified file, not all files? Like this: child_process.exec(“refresh db_example.txt”) ?

1 Like

There’s no mechanism in Glitch to do that, I’m afraid.

We do plan on providing better support for dynamically-updated files in the future, but I don’t have a firm timeline on when that might be available.

1 Like