'View Live' 504 error and logs not loading



I am running a simple project but cannot seem to get logs to load or ‘View Live’. Logs just continue loading forever and ‘view live’ eventually gives a 504 error. Am I doing something wrong?

It’s held here.




Your server.js file is empty, so your project doesn’t know what to do, and there’s nothing to see when viewing the project so it times out producing the 504. If you add a simple server config, it’ll finish loading as expected e.g. copy the following into server.js

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

app.get("/", function (request, response) {

var listener = app.listen(process.env.PORT, function () {
  console.log('Your app is listening on port ' + listener.address().port);


Sorry - I had tried removing the content of server.js to see if it would help. Re-saved it with some code which gives the same problem.


Per my example, you’re missing the listener:


Got it, works now - thanks!