diff --git a/README.md b/README.md index 7389db5..eff603a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ -# tinder for jobs - +# Instructions to Run + +`node server.js` which will serve the static files diff --git a/server.js b/server.js index 8d4d7a9..1d046ed 100644 --- a/server.js +++ b/server.js @@ -8,7 +8,7 @@ app.use('/css', express.static(__dirname + '/public/css')); app.use('/js', express.static(__dirname + '/public/js')); app.use('/images', express.static(__dirname + '/public/images')); -var server = app.listen(8081, function () { - var port = server.address().port; +const port = server.address().port || 8081; +var server = app.listen(port, function () { console.log('Server started at http://localhost:%s', port); });