var express = require('express');
var app = express();
var port = process.env.PORT || 8080;

require('./config/middleware.js')(app, express);
// require('./database.js');
process.env.PWD = process.cwd();
console.log(process.env.PWD + '/dist');
app.use(express.static(process.env.PWD + '/dist'));

if(!module.parent){ 
 app.listen(port);
}

module.exports = app;

@@ -237,16 +237,50 @@
 dist');%0A
+console.log(__dirname + '/dist');%0A
 app.use(
@@ -294,31 +294,25 @@
 .static(
-process.env.PWD
+__dirname
  + '/dis

fix server