N
N
newaitix2020-10-29 15:43:26
Node.js
newaitix, 2020-10-29 15:43:26

Server not working on heroku, how to fix it?

Get request throws an error

2020-10-29T12:40:59.323549+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=frozen-sands-21043.herokuapp.com request_id=a2479be8-b012-4bac-99ef-60803e1ca147 fwd="188.163.31.152" dyno= connect= service= status=503 bytes= protocol=https

code on heroku
var http=require('http');
var port=process.env.PORT||'8080';
http.createServer().on('request', function(req, res){
  res.end('Hello');
}).listen(port,function(){
  console.log('Server Run');
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2020-10-30
@2ord

Check the contents of the Procfile.
Run locally heroku local.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question