部署应用程序时出错,导致Node.js的Heroku部署崩溃

时间:2020-05-09 18:57:29

标签: node.js heroku

嗨,我有一个正在运行的节点应用程序,在部署它时出现此错误:

at=error code=H10 desc="App crashed" method=GET path="/" host=vvat.herokuapp.com request_id=14bca241-fa50-4042-b26e-1235c4abeca0 fwd="85.250.217.223" dyno= connect= service= status=503 bytes= protocol=https

该应用正常运行,我不知道是什么原因造成的,这是我的代码:

const express = require("express");
const connectDB = require("./config/db");

const app = express();

//connect Database
connectDB();

app.use(express.json({ extended: false }));
const PORT = process.env.PORT || 5000;

app.use("/api/auth", require("./routes/api/authAPI"));
app.use("/api/maps", require("./routes/api/mapAPI"));
app.use("/api/profile", require("./routes/api/profileAPI"));

app.listen(PORT, () => console.log(`Server started on port ${PORT}`));

module.exports = app;

怎么回事?

0 个答案:

没有答案