var path = require('path')
var express = require('express')

var args = process.argv.slice(2)
var env = args[0]

var app = express()

app.use(express.static(path.resolve(env === 'dev' ? '.' : 'dist')))

app.get('/', (req, res, next) => {
  res.sendFile(path.resolve('dist/index.html'))
})

app.listen(8080, function() {
  console.log('Server started at 8080')
})

@@ -57,81 +57,87 @@
 s')%0A
-%0A
 var a
-rgs = process.argv.slice(2)%0Avar env = args%5B0%5D%0A%0Avar app = express()%0A
+pp = express()%0A%0Avar staticfiles = process.argv%5B2%5D === 'dev' ? '.' : 'dist'
 %0Aapp
@@ -173,36 +173,19 @@
 lve(
-env === 'dev' ? '.' : 'dist'
+staticfiles
 )))%0A

Simplify the server