Sqlite db file help


i have a question here regarding the sqlite db files that have extension of .sqlite.

currently i started to use github to import all my updated files after using atom to commit into github

so basically my dev process is something like this

atom -> github -> glitch.

in this case, Glitch will keep on replacing my .sqlite file which causes my db to reset everytime i import from github to glitch and if i don’t include the .sqlite file on my github, after import, glitch will have everything replace as if there is no .sqlite file before cause was not in github repo. Is there anyway to prevent this?

What is the .data directory?

Could you put your database file in the .data directory?

That directory is in .gitignore, and also doesn’t get copied when someone remixes your project.


Where can i find this .data directory?
i am not able to see them at the directory tree


That’s right - it’s not in the editor directory tree.

Depending on your project you could open up the console and mkdir .data. Or in your code when you create the database just write into the .data directory and it will make the directory for you

let db =  new sqlite3.Database('.data/db.sqlite')


thanks, will try. should work