You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--main.js--
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');
--index.html--
nw rocks !
running that with node-webkit v0.3.7 on windows 7 x64 :
nw launches as expected and a http request from any other browser to localhost:1337 returns the "hello world" content as expected
when clicking devtool button, NW closes without any prompt
please note that if I call the .listen function of the server after displaying devtools, things are running well (no unexpected closes when opening devtools)
The text was updated successfully, but these errors were encountered:
The error was EADDRINUSE, it's caused by the new renderer process for devtools trying to execute the main.js script again and found the port is being used.
I'll fix this by not running main.js in devtools. And you can use a workaround to launch the server from index.html before the fix is released with the next version.
--package.json--
{
"name": "server",
"description": "server",
"version": "0.1",
"nodejs":true,
"node-main": "main.js",
"main": "index.html",
"window": {
"show": true,
"toolbar": true,
"fullscreen":false
}
}
--main.js--
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');
--index.html--
nw rocks !
running that with node-webkit v0.3.7 on windows 7 x64 :
please note that if I call the .listen function of the server after displaying devtools, things are running well (no unexpected closes when opening devtools)
The text was updated successfully, but these errors were encountered: