var compression = require('compression');
var express = require('express');
var app = express();
var courses = require ('./master.json');
var search = require('./search.json');

app.use(compression());

/*
app.use(function(req,res,next){
  //console.log(req.ip);
  //fs.appendFile('iplog.txt', req.ip)
  next();
});
*/

app.use(express.static('.'));

app.get('/api/:id', function(req, res){
  res.send(JSON.stringify(courses[req.params.id]));
});

app.get('/search/:id', function(req, res){
  res.send(JSON.stringify(search[req.params.id]));
})


app.listen(3000, 'localhost', function(){
  console.log("Server started at 3000");
});

@@ -208,133 +208,8 @@
 %0D%0A%0D%0A
-/*%0D%0Aapp.use(function(req,res,next)%7B%0D%0A  //console.log(req.ip);%0D%0A  //fs.appendFile('iplog.txt', req.ip)%0D%0A  next();%0D%0A%7D);%0D%0A*/%0D%0A%0D%0A
 app.
@@ -438,24 +438,61 @@
 );%0D%0A%7D)%0D%0A%0D%0A%0D%0A
+var port = process.argv%5B2%5D %7C%7C 3000;%0D%0A
 app.listen(3
@@ -490,20 +490,20 @@
 .listen(
-3000
+port
 , 'local
@@ -559,13 +559,16 @@
  at 
-3000%22
+%22 + port
 );%0D%0A

Allow port as argument to server.js