I am developing a chrome extension. I want to connect my extension to an SQL database on my computer. Which are the possible and efficient ways I can do this?
Asked
Active
Viewed 2,280 times
1
-
11) configure web access on localhost in your database and access it from your extension using [XHR/fetch](https://developer.chrome.com/extensions/xhr), 2) find or write a separate utility (in node.js or any other language) that accesses the database directly and communicates with your extension via [nativeMessaging API](https://developer.chrome.com/extensions/nativeMessaging). – wOxxOm Feb 02 '19 at 11:39
-
Possible duplicate of [Connecting to DB from a Chrome Extension?](https://stackoverflow.com/questions/5769081/connecting-to-db-from-a-chrome-extension) – Raymond Nijland Feb 02 '19 at 11:42
-
1yes but answers there is all about AJAX. I want to know all different methods, that can be used. – shaswat kumar Feb 02 '19 at 16:57
-
Since chrome extensions support [raw tcp sockets](https://stackoverflow.com/q/1535752/1048572), it should be possible to connect. You'll probably have to rewrite the network part of a node.js library, though – Bergi Jan 15 '21 at 17:26