Adjusted code; app server can now be passed in

do not get port info from app.get('port'), get it from cli instead.