Is it possible to embed a HTTP server in a Google Chrome extension? Is it possible to embed a HTTP server in a Google Chrome extension? google-chrome google-chrome

Is it possible to embed a HTTP server in a Google Chrome extension?


Here is another web server implemented with chrome.socket: https://github.com/kzahel/web-server-chrome. The server example linked to in chrome-app-samples is actually really buggy and will lock up if you e.g. hold down Ctrl-R on a page served by it.


If you want to do a remote control for the browser, would something like HTML5 WebSockets work for you?

http://www.html5rocks.com/tutorials/websockets/basics/

You can have an external "remote" server that your extension listens to via WebSockets. If you want to host a webserver via extensions. You would need to use NPAPI, there are many C++ libraries out there (Google search) that can do a simple webserver. But I would rather use WebSockets communicate to an external server which will provide you anything you want.

But if you insist, you would need to learn C++, NPAPI, there are many examples online regarding NPAPI.