public 目录可以直接访问,我不习惯使用默认,会修改为js,css,img同时会修改相对应的路径
部署BAE
上传代码到BAE,发现报错,错误信息如下
1 2 3 4 5 6 7 8 9 10 11 12 13
552 occured because of user code error
your package.json file error
pacakge.json must json file and must contain "scripts":{"start":"node xxx.js"}
please modify your package.json and recommit your code
Error Message is
[2016-07-29 14:47:57.550] [ERROR] manager - catch signal SIGTERM, manager will exit [2016-07-29 14:48:00.316] [ERROR] manager - scripts.start in package.json must contain ".js", but your scripts.start is "node ./bin/www" get more message, please check manager.log
start 必须以.js结尾。重命名bin/www为bin/www.js即可
如果不上传依赖文件,错误信息如下:
1 2 3 4 5 6 7 8 9 10 11 12 13
失败原因:编译失败 失败信息:Fix depends failed. Please check requirements.txt or package.json.
npm ERR! Linux 3.10.1-grsec npm ERR! argv "/home/bae/bae/node-v4.4.4-linux-x64/bin/node" "/home/bae/bae/node-v4.4.4-linux-x64/bin/npm" "install" "--production" npm ERR! node v4.4.4 npm ERR! npm v2.15.1 npm ERR! failed to fetch from registry: http://registry.cnpmjs.org/morgan npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Please include the following file with any support request: npm ERR! /home/bae/run/baeng/helios/work/appid9rupli9dyd/.bae/npm-debug.log