The short answer is, you can't. However there is a way around it using a server.
HTML/CSS/JS is a client. You need to connect to a server to get the page, database or any other type of dynamic content. Repl.it handles the server for you when you choose HTML in the languages menu. You'll need to write your own server.
Once you've set up your server, add the sqlite3 (built-in) module if you use Python, and the NPM package sqlite3 (https://www.npmjs.com/package/sqlite3).
I have posted a Quart Python server template on my profile if you need somewhere to get started and you choose Python.