在部署到IBM BlueMix上时,我很难找到正确的Parse模块。我尝试过以下方法:
var Parse = require('node-parse-api').Parse;
这在本地工作,因为我使用npm-install进行解析,但我不确定如何在IBM BlueMix上包含此模块。
答案 0 :(得分:1)
使用cf push <appname>
会将node-parse-api
部署到Bluemix。
在您的node.js应用程序的node-parse-api
文件中添加package.json
示例:
{
"name": "NodejsStarterApp",
"version": "0.0.1",
"description": "A sample nodejs app for Bluemix",
"scripts": {
"start": "node app.js"
},
"dependencies": {
"express": "4.12.x",
"cfenv": "1.0.x",
"node-parse-api": "0.3.8"
},
"repository": {},
"engines": {
"node": "0.12.x"
}
}