Reputation: 3929
I want to be able to execute local shell commands in a web application.
Chrome Native messaging api seems to be good for that, but as it needs also a service in background, I do not see a real difference with a little http server. Is there a real structural difference between them? As I see there is somewhere a socket used as an interface.
Is there any other solutions for that?
Upvotes: 1
Views: 533
Reputation: 77551
Chrome Native messaging does not work by calling a running daemon. Instead, it spawns a new process each time sendMessage
or connect
is called.
While you can keep the process you opened with connect
running, if you want to do one-shot commands the sendMessage
approach is good.
Do note that you will still need a Chrome App or Extension installed to be able to do it, as well as a (separately installed) Native Host module.
Upvotes: 2