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

// Public directory for all static assets
app.use(express.static('public'));

// Set views and jsx for view engine
app.set('views', __dirname + '/views');
app.set('view engine', 'jsx');
app.engine('jsx', require('express-react-views').createEngine());

app.get('/', function(req, res) {
  const data = JSON.parse(fs.readFileSync('data/data.json', 'utf8'));
  res.render('index', { title: "They Rejected Us.", stories: data.stories.reverse() });
});

var server = app.listen(8080, function () {
  console.log('Listening at http://localhost:8080');
});

@@ -324,16 +324,61 @@
 gine());
+%0Aapp.set('port', (process.env.PORT %7C%7C 5000));
 %0A%0Aapp.ge
@@ -568,16 +568,17 @@
 );%0A%7D);%0A%0A
+%0A
 var serv
@@ -593,20 +593,31 @@
 .listen(
-8080
+app.get('port')
 , functi
@@ -643,43 +643,53 @@
 og('
-Listening at http://localhost:8080'
+Node app is running on port', app.get('port')
 );%0A%7D

fix server.js