Reputation: 6643
I don't want to create a chrome extension ONLY using node.js.
I know chrome extensions use HTML, CSS and JavaScript.
But I want to make a chat application as a chrome extension. I found that using MEAN stack along with socket.io for a chat application is the latest way and is efficient.
1) So, I'm wondering if it is possible to integrate or link my node application as a Google chrome extension?
2) If not possible, does plain JavaScript or any other library serve the same purpose? Can I use socket.io with JavaScript?
Upvotes: 0
Views: 739
Reputation: 6561
Node.js does not run natively within Chrome extensions or Chrome apps, but you can definitely write a Chrome extension chat app using node.js and socket.io.
To do so, have your extension use a Page Action. Your popup.html would be an JavaScript app (for example, using AngularJS), and it would talk to a node.js backend (for example, using socket.io lib).
Upvotes: 1
Reputation: 11245
For a chat application you would need a server, which should not be in the browser. Chat clients may be built using the current HTML + CSS + JS extensions API, you do not need Node.JS for creating them.
Yes, you can use Socket.io with the Google Chrome extensions, you just have to include the Socket.io client-side script in you extension
Upvotes: 2