Is there a way to view my sqlite table on a webpage?

Hi, I am very new to glitch and programming in general, so I might sound like a noob. Pardon me for that. I am creating a discord bot using js. I have added an sqlite table with some data in it. But i am afraid I might have put lots of potentially unwanted data in the table. So I wanted to know if there is a way to view that table maybe in a webpage or something, so that I can rectify my mistakes. Thanks for your help.

I’m not aware of a web viewer for sqlite that runs on Node.js. However, you can export to HTML using the console. For our example sqlite project for example, you could run the following command:
sqlite3 -html .data/database.sqlite "select * from users" > views/export.html

And then if you add a route for views/export.html you can view the exported data. You can’t edit it using the HTML interface though.

1 Like

Thanks Gareth. The export worked in the export.html file that I creared. Also I added a route to view the file. But the data is not showing in tabular form. Is it because I didn’t add the html markups in export.html file? I thought the export would add all required html markup as well, but it didn’t. It just added the tr and td.
Thanks for the help. Appreciate it :slight_smile: