代码(server.js)如下面的Firebase文档示例
var firebase = require("firebase");
firebase.initializeApp({
databaseURL: "https://mydatabaseName.firebaseio.com",
});
var db = firebase.database();
var ref = db.ref("/Users");
ref.on("value", function(snapshot) {
console.log(snapshot.val());
});
但我遇到了错误
Error waiting for process to terminate: No child processes
State changed from starting to crashed
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
Stopping process with SIGKILL
Process exited with status 22
在Google上搜索此问题后,我尝试添加到Procfile
worker: node server.js
heroku ps:scale worker=1 web=0
这些似乎都不起作用。有什么建议吗?