这是我的github repo的链接
我正试图使一个应用程序在节点js,一个简单的cron发送电子邮件每秒钟。我想把它放在Openshift服务器上。但是我不知道如何使它起作用。我做了很多研究,但还是没能成功。
我希望你能检查我的代码,特别是包。Json和server.js我得到的错误是当我回显log
时You specified a Timezone but have not included the `time` module. Timezone funct
ionality is disabled. Please install the `time` module to use Timezones in your
application.
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EACCES
at errnoException (net.js:884:11)
at Server._listen2 (net.js:1003:19)
at listen (net.js:1044:10)
at Server.listen (net.js:1110:5)
at Object.<anonymous> (/var/lib/openshift/53671fef4382ec57c1000097/app-root/
runtime/repo/server.js:3:7)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
DEBUG: Program node server.js exited with code 8
DEBUG: Starting child process with 'node server.js'
我只是一个node.js的初学者,任何帮助都会非常感激。
EDIT:这个脚本在LOCALHOST上工作得很好。即使不需要安装"time"模块
在您的包。Json中,添加"time"模块到依赖对象:
"dependencies": {
// other modules...
// :
// :
"time": "*"
},
此错误显示模块'time'缺失。
试题:
npm install -g time
编辑我试图在我的本地运行你的代码,我得到同样的错误。当我输入npm install -g time时,我得到错误:
错误:Can't find Python可执行文件" Python ",你可以设置Python的env变量。
所以,也许你应该先安装python.exe,在你的生产机器上?在windows中,您必须设置环境变量,例如:
set PYTHON=D:PythonbinPython.exe
我没有更多的想法