Node.js SQLite Database
KENNETHTRIPP

Ok, now that @Coder100 helped me connect a Node.js server to HTML, CSS, and JS I need to connect Node.js to an SQLite database. I hope he knows how to do that too because I have absolutely no clue.
Also, I created a new post just for this just in case someone in the future needs help with just this and already knows how to use Node with HTML, CSS, and JS.

You are viewing a single comment. View All
Coder100

Yeah sure, I did play around with it a bit, and decided noSQL was cooler, but that's my opinion lol

so the most popular lib is unsurprisingly called sqlite3
https://www.npmjs.com/package/sqlite3

its docs are really good and the example in the front page is basically like all I ever used it for xd

if it doesn't compile then report to bugs
https://repl.it/bugs
it's really frustrating when a lot of these awesome C++ libraries aren't even available

KENNETHTRIPP

@Coder100 Ok, thanks!

Coder100
KENNETHTRIPP

@Coder100 One last question: Could I use sqlite3 in plain JavaScript? I know it wouldn't be secure or anything, but just hypothetically. Or would repl.it database be better?

Coder100

@KENNETHTRIPP it might be secure if you know hashing, but there is a bigger bug than that: persistance

you see, to prevent abuse, if you are not on the repl, and it has been a certain amount of time, programmatic edits won't be saved.

KENNETHTRIPP

@Coder100 Ohhh, cause client side scripts don't run forever?