Original author: @gpetrov
Original source: rogerwang/node-webkit/#149 (comment)
Last active
August 29, 2015 14:03
-
-
Save sbruchmann/772576023528f57a58e4 to your computer and use it in GitHub Desktop.
Restart a node-webkit app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Restart node-webkit app | |
var child_process = require("child_process"); | |
//Start new app | |
var child = child_process.spawn(process.execPath, [], {detached: true}); | |
//Don't wait for it | |
child.unref(); | |
//Quit current | |
GUI.window.hide(); // hide window to prevent black display | |
GUI.app.quit(); // quit node-webkit app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment