在集成Twilio和Parse时遇到IBM BlueMix问题

时间:2015-10-04 01:37:08

标签: node.js parse-platform twilio ibm-cloud

在部署到IBM BlueMix上时,我很难找到正确的Parse模块。我尝试过以下方法:

 var Parse = require('node-parse-api').Parse;

这在本地工作,因为我使用npm-install进行解析,但我不确定如何在IBM BlueMix上包含此模块。

1 个答案:

答案 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"
        }
}