【发布时间】:2016-07-23 05:56:26
【问题描述】:
我正在尝试使用快速生成器使用 Node 和 Express 制作应用程序,并使用 node-webkit 打包所有内容。 express 生成器创建了一个非常基本的应用程序,但它可以在 localhost:30000 上运行 npm start。
清单
{
"name": "app",
"version": "0.0.0",
"private": true,
"node-main": "./app.js",
"main": "http://localhost:8080",
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"body-parser": "~1.15.1",
"bower": "^1.7.9",
"cookie-parser": "~1.4.3",
"debug": "~2.2.0",
"express": "~4.13.4",
"morgan": "~1.7.0",
"pug": "^2.0.0-beta4",
"serve-favicon": "~2.3.0"
}
}
当我使用 nwjs 运行应用程序时,窗口显示无法加载页面,但控制台没有显示任何错误。我尝试改变
“main”:“http://localhost:8080”到“main”:“http://localhost:3000”
这是应用程序通常的运行方式,但它也不起作用。
这可能吗? 我错过了什么?
提前致谢
【问题讨论】:
标签: node.js node-webkit express-generator