const express = require('express')
const next = require('next')

const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
const proxy = require('http-proxy-middleware')

app.prepare()
  .then(() => {
    const server = express()

    server.use('/api', proxy('http://127.0.0.1:3001'))
    server.use('/auth', proxy('http://127.0.0.1:3001'))
    server.use('/ws', proxy('http://127.0.0.1:3001'))

    server.get('*', (req, res) => {
      return handle(req, res)
    })

    server.listen(3000, (err) => {
      if (err) throw err
      console.log('> Ready on http://127.0.0.1:3000')
    })
  })

@@ -219,16 +219,49 @@
 leware')
+%0Aconst logger = require('morgan')
 %0A%0Aapp.pr
@@ -314,16 +314,145 @@
 ress()%0A%0A
+    const logTarget = dev%0A      ? /%5E(?!%5C/_next%5C/on-demand-entries-ping).+/%0A      : '*'%0A    server.use(logTarget, logger('dev'))%0A%0A
     serv

Add request logger