在Heroku Parse Server上安装Twilio

时间:2016-02-28 22:36:34

标签: node.js heroku parse-platform npm cloud-code

我在Heroku上运行了一个有效的Parse Server,我正在努力让我的Twilio云代码正常工作。一旦我将 <! DOCTYPE html> <html> <head> <meta charset ="UTF-8"> <title> Townin </title> <link rel="stylesheet" type="text/css" href="Townin/style.css"> <style> body {background-color: white;} header{background-color:#6ab47b; border-color:#599a68; } header h1, h2 {margin-left: 20px; color: white; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } h1, h1 {margin-left: 20px; color: gray; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } p {margin-left: 20px; color: gray; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } nav a, nav a:visited { color: white; background-color: #599a68;} nav a.selected, nav a:hover{color: black; background-color:#6ab47b;} nav { text-align:center; padding: 0 0; margin:20px 0 0; height: 50 px; background-color:#599a68; } nav ul { list-style:none; margin: 0px 10px; padding: 0px; } nav ul li { display: inline-block; border-right: 1px solid #6ab47b; text-align: center; width: 250px; padding:0px 0px; } nav ul li a { display: block; height: 40px; width: 100%; line-height:50px; background-color: #599a68; } li a:hover { background-color: #6ab47b; } a:link { text-decoration: none; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; color:gray; } a:visited { color:gray; } .button { background-color:#6ab47b; color: #fff; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; font-weight: bold; margin: 0px 20px; padding:20px 20px; border-radius: 100 %; } .button:visited { color:white; } #bar-knap { display: inline-block; max-width: 100%; border-radius:10%; height:40%; width:20%; margin: 10px 10% 10px 10%; border-style:solid; border-color:gray; } #spise-knap { display: inline-block; max-width: 100%; border-radius:10%; height:40%; width:20%; margin:10px 10% 10px 10%; border-style:solid; border-color:gray; } footer { background-color: #6ab47b; color: white; height: 70px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; text-align: center; margin: 20px auto 0px auto; } </style> </head> <body> <?php include ("Header2.php"); ?> <a href="barer.php" >Barer <img src="img/barknap.jpg" alt="Barer" id="bar-knap"> </a> <a href="spisesteder.php" >Spisesteder <img src="img/spiseknap.png" alt="Spisesteder" id="spise-knap"> </a> <!--Search form--> <p style="text-align:center;"> Søg mellem barer </p> <br /> <br /> <form method="post" action="search.php"> <input type="text" name="search" /> <input type="submit" name="submit" value=" Search "> </form> <br /> <br /> <footer> Natalie </footer> </body> </html> 添加到我的main.js,应用程序就会中断。 Parse.com(Key Bindings)的迁移指南显示Twilio应该从“官方npm模块”安装。怎么做到这一点?谢谢你的帮助!

1 个答案:

答案 0 :(得分:0)

我必须修改package.json,添加"twilio": "~2.9.0"作为依赖项。我还能够通过安装Heroku工具带并从终端运行heroku logs --tail --app your_app_name来更好地解决这个问题。我最初通过运行heroku run npm install twilio --app your_app_name通过Heroku工具带安装了twilio,但我不确定这是否是必需的。