运行我的 node.js 程序时 Heroku 上的 H12 错误

ZevDoesStuff

当我尝试在 Heroku 上运行我的应用程序时出现 H12 错误。这是错误。

at=error code=H12 desc="Request timeout" method=GET path="/" host=zevsbot.herokuapp.com request_id=fa37cd30-9f13-4bd2-bc6a-de4b9c0709a2 fwd="202.21.107.88" dyno=web.1 connect=0ms service=30001ms status=503 bytes=0 protocol=https

我的档案

web: node index.js

这是我的 index.js 文件

var express = require('express');
var app = express();

app.set('port', (process.env.PORT || 5000));

app.use(express.static(__dirname + '/public'));

app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');

app.get('/', function(request, response) {
    response.render;
});

app.listen(app.get('port'), function() {
    console.log('Node app is running on port', app.get('port'))
});

这是我的 package.json 文件,如果有帮助的话

{
  "requires": true,
  "lockfileVersion": 1,
  "dependencies": {
    "bundle": "^2.1.0",
    "ejs": "^2.6.1",
    "express": "^4.9.8",
    "steam-tradeoffer-manager": "^2.9.5",
    "steam-user": "^4.8.0",
    "steamcommunity": "^3.40.0",
    "tf2": "^3.0.0"
  },
  "name": "bot",
  "version": "1.0.0",
  "main": "index.js",
  "devDependencies": {},
  "scripts": {
    "start": "node index.js"
  },
  "author": "Zev",
  "license": "ISC",
  "description": "Wow",
  "engines": {
    "node": "10.15.3"
  }
}

如果你们能提供帮助,我将不胜感激。

斯维克拉姆吉特

app.listen(process.env.PORT || 4000, function(){ console.log('你的节点js服务器正在运行'); });

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

尝试npm运行迁移以部署我的应用程序时在heroku上出错

为什么我的heroku node.js应用程序给出at =错误代码= H10 desc =“应用程序崩溃”方法= GET路径=“ /”?

在Heroku上创建node.js应用程序时是否应该将node_modules检入git中?

尝试在Heroku上部署Node.js / Express / Socket.io应用程序时出现应用程序错误

如何在Heroku上启用ES2017功能运行Node.js应用程序?

Heroku运行bokeh服务器-H12超时

Heroku Django应用程序错误:工人超时问题(H12)

Heroku Node.js错误,代码= H10 desc =“应用程序崩溃”

当我在api大于19的设备上运行我的应用程序时,出现错误

在Heroku上运行几个node.js脚本

Azure WebApp Linux-运行node.js Express应用程序时权限被拒绝错误

Node.JS的Heroku错误代码H12问题,MongoDB Atlas后端

“请求超时” H12 Heroku错误导致访问MongoDB Atlas

在Heroku上运行应用程序时,没有名为“ app.settings”的模块错误

运行Node.js程序时出现错误

调试Node.js应用程序时WebStorm在错误的文件上停止

当我尝试在Linux上运行程序时,我的程序抛出错误(在Windows上运行正常)

Heroku上的Node.js和Express with socket.io-H12和H13错误

Heroku Node.js (express.js) 应用程序在本地运行,但在使用 MongoDB 时在 heroku 上失败

H12 在 heroku 上请求超时 503 然后 200 成功

在 Heroku 或 RedHat Openshift Online 上部署 node.js 程序时出现“找不到模块”错误消息

在 Heroku 上运行我的应用程序时,为什么会出现引导超时错误(错误 R10)?

启动我的 node.js 应用程序时出现错误 connect ECONNREFUSED 127.0.0.1:3306

在 Heroku 上部署我的 Rails 应用程序时出现错误 H-10

部署在 Heroku 上的 MERN 应用程序无法响应代码为 H12 状态 503(超时)的请求

错误 R14 和 H12,使用 heroku 部署的工作线程超时

当我尝试启动我的 Node.js 应用程序时出现 UnhandledPromiseRejectionWarning 错误

调用API时heroku超时错误H12

如何修复heroku上的“无法编译Node.js应用程序”错误