Reputation: 2017
In node webkit you can pass arguments via commandline to a nw.exe file like --url="foo"
. I've got a project that is compressed and packaged using Node Webkit Builder https://github.com/mllrsohn/node-webkit-builder which gives me an outputted exe, but when I try to pass command line arguments to it like the one above, it hangs up and creates some nw.exe processes, but no window appears and it breaks.
Has anyone had any luck with this?
Upvotes: 1
Views: 1917
Reputation: 2022
The specific command you want (--url="website-url"
) comes built in:
If you want to access that arg or any other from within your app, use this:
var myArgs = require('nw.gui').App.argv;
myArgs
will be an array containing all arguments.
Upvotes: 0