const app = require('./app');

app.listen(3000, () =>{
  console.info('running on port 3000');
});


@@ -3,56 +3,543 @@
 nst 
-app = require('./app');%0A%0Aapp.listen(3000, () =%3E%7B
+fs = require('fs');%0A%0Aconst ENV = require('./config/environment');%0Aconst app = require('./app');%0A%0Alet server = null;%0A%0Aif (ENV.https) %7B%0A  const https = require('https');%0A  let key = fs.readFileSync('./server.snakeoil.key', 'utf8');%0A  let cert = fs.readFileSync('./server.snakeoil.cert', 'utf8');%0A  server = https.createServer(%7Bkey, cert%7D, app);%0A%7D%0Aelse %7B%0A  const http = require('http');%0A  server = http.createServer(app);%0A%7D%0A%0A%0Aserver.listen(ENV.port, () =%3E%7B%0A  let hostname = %60$%7BENV.https ? 'https' : 'http'%7D://$%7BENV.hostname%7D:$%7BENV.port%7D%60;
 %0A  c
@@ -554,20 +554,22 @@
 nfo(
-'run
+%60liste
 ning on 
 port
@@ -568,18 +568,53 @@
  on 
-port 3000'
+$%7Bhostname%7D%60);%0A  console.info('ENV:', ENV.env
 );%0A%7D

allow server to be hosted on https