Update app.js

fix hanging of served files in latest version of node
support for process.env.PORT