1

I've written a basic node-webkit application, and I also have a separate web application. I would like to be able to pass information to the node-webkit application from the web application directly, but from what I can tell so far this has not been done.

I looked into using CORS, but this will not work when pointed outside of a web browser (I tried to point it at a file url [file://blahblah/blah] on the host machine). I realize that I could just run a webserver within the node-webkit application to listen for calls from the web application, but it doesn't seem like good practice to have an application accepting requests over localhost...even if I chose some obscure port to use.

This is a very new area of development for me, so I have been looking every which way for a reasonable solution to this problem. At the moment the only idea I have would be to create a small native OSX application to wrap around the node-webkit application. OSX applications are capable of using custom URL schemes, so this shouldn't be a problem.

I would greatly appreciate any suggestions from the community. Thanks for reading.

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
ninehundreds
  • 1,097
  • 2
  • 21
  • 43

1 Answers1

0

There is a issues for that https://github.com/rogerwang/node-webkit/issues/255 but, so far, it is not ready yet. It looks like they intent to put this configuration into the package.json, as you can see here https://github.com/rogerwang/node-webkit/issues/99.

Thiago Mata
  • 2,825
  • 33
  • 32
  • This thread http://stackoverflow.com/questions/18534591/how-to-register-a-url-protocol-handler-in-node-js has a lot info about this. – Thiago Mata Aug 25 '14 at 22:19