<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>


<h2 dir="auto">Current Behavior</h2>


<p dir="auto">{ Error: No page context<br>
at Function._callee$ (/Users/liumin/Desktop/next/with-redux-saga/node_modules/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-redux-wrapper">next-redux-wrapper</a>/lib/index.js:169:25)<br>
at tryCatch (/Users/liumin/Desktop/next/with-redux-saga/node_modules/regenerator-runtime/runtime.js:62:40)<br>
at Generator.invoke [as _invoke] (/Users/liumin/Desktop/next/with-redux-saga/node_modules/regenerator-runtime/runtime.js:296:22)<br>
at Generator.prototype.(anonymous function) [as next] (/Users/liumin/Desktop/next/with-redux-saga/node_modules/regenerator-runtime/r<br>
untime.js:114:21)<br>
at step (/Users/liumin/Desktop/next/with-redux-saga/node_modules/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-redux-wrapper">next-redux-wrapper</a>/node_modules/@babel/runtime/helpers/asyncToGener<br>
ator.js:12:30)<br>
at _next (/Users/liumin/Desktop/next/with-redux-saga/node_modules/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-redux-wrapper">next-redux-wrapper</a>/node_modules/@babel/runtime/helpers/asyncToGene<br>
rator.js:27:9)<br>
at /Users/liumin/Desktop/next/with-redux-saga/node_modules/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-redux-wrapper">next-redux-wrapper</a>/node_modules/@babel/runtime/helpers/asyncToGenerator.js:34:7<br>
at new Promise (/Users/liumin/Desktop/next/with-redux-saga/node_modules/core-js/library/modules/es6.promise.js:177:7)<br>
at Function. (/Users/liumin/Desktop/next/with-redux-saga/node_modules/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-redux-wrapper">next-redux-wrapper</a>/node_modules/@babel/runtime/helpers/asyncToGenerator.js:7:12)<br>
at Function.value [as getInitialProps] (/Users/liumin/Desktop/next/with-redux-saga/node_modules/<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-redux-wrapper">next-redux-wrapper</a>/lib/index.js:211:25)<br>
at _callee$ (/Users/liumin/Desktop/next/with-redux-saga/node_modules/next/dist/lib/utils.js:111:30)<br>
at tryCatch (/Users/liumin/Desktop/next/with-redux-saga/node_modules/regenerator-runtime/runtime.js:62:40)<br>
at Generator.invoke [as _invoke] (/Users/liumin/Desktop/next/with-redux-saga/node_modules/regenerator-runtime/runtime.js:296:22)<br>
at Generator.prototype.(anonymous function) [as next] (/Users/liumin/Desktop/next/with-redux-saga/node_modules/regenerator-runtime/runtime.js:114:21)<br>
at step (/Users/liumin/Desktop/next/with-redux-saga/node_modules/@babel/runtime/helpers/asyncToGenerator.js:12:30)<br>
at _next (/Users/liumin/Desktop/next/with-redux-saga/node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:9) sourceMapsApplied: true }</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<ol dir="auto">
<li>curl <a href="https://codeload.github.com/zeit/next.js/tar.gz/canary">https://codeload.github.com/zeit/next.js/tar.gz/canary</a> | tar -xz --strip=2 next.js-canary/examples/with-redux-saga</li>
<li>cd with-redux-saga</li>
<li>yarn</li>
<li>yarn add next <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-redux-saga">next-redux-saga</a> <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-redux-wrapper">next-redux-wrapper</a></li>
<li>yarn dev</li>
</ol>
<h2 dir="auto">Context</h2>


<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>6.0.1</td>
</tr>
<tr>
<td>node</td>
<td>v10.0.0</td>
</tr>
<tr>
<td>OS</td>
<td>macOS 10.13.4</td>
</tr>
<tr>
<td>browser</td>
<td>chrome</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>
<p dir="auto">package.json<br>
{<br>
"name": "with-redux-saga",<br>
"version": "1.0.0",<br>
"license": "MIT",<br>
"scripts": {<br>
"dev": "next",<br>
"build": "next build",<br>
"start": "next start"<br>
},<br>
"dependencies": {<br>
"es6-promise": "4.1.1",<br>
"isomorphic-unfetch": "2.0.0",<br>
"next": "^6.0.1",<br>
"<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-redux-saga">next-redux-saga</a>": "^3.0.0-beta.1",<br>
"<a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-redux-wrapper">next-redux-wrapper</a>": "^2.0.0-beta.6",<br>
"react": "^16.0.0",<br>
"react-dom": "^16.0.0",<br>
"react-redux": "5.0.5",<br>
"redux": "3.7.2",<br>
"redux-saga": "0.15.4"<br>
},<br>
"devDependencies": {<br>
"redux-devtools-extension": "2.13.2"<br>
}<br>
}</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>


<p dir="auto">The recent change in Next.js 5.0.0 removed the <code class="notranslate">poweredByHeader</code> options from <code class="notranslate">next.config.js</code> and <a href="https://github.com/zeit/next.js/blob/canary/errors/powered-by-header-option-removed.md">instructs the user</a> to remove it in their custom server.</p>
<h2 dir="auto">Current Behavior</h2>


<p dir="auto">X-Powered-By header cannot be removed or overwritten in custom Express or Koa server.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<p dir="auto">Tested using Express &amp; Koa examples.</p>
<h3 dir="auto">Express</h3>
<p dir="auto"><a href="https://custom-server-express-nobxbpklyw.now.sh" rel="nofollow">https://custom-server-express-nobxbpklyw.now.sh</a></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const port = parseInt(process.env.PORT, 10) || 3000
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()

app.prepare()
.then(() =&gt; {
  const server = express()

  server.get('/a', (req, res) =&gt; {
    return app.render(req, res, '/b', req.query)
  })

  server.get('/b', (req, res) =&gt; {
    return app.render(req, res, '/a', req.query)
  })

  server.get('/posts/:id', (req, res) =&gt; {
    return app.render(req, res, '/posts', { id: req.params.id })
  })

  server.get('*', (req, res) =&gt; {
    res.removeHeader('x-powered-by')
    return handle(req, res)
  })

  server.listen(port, (err) =&gt; {
    if (err) throw err
    console.log(`&gt; Ready on http://localhost:${port}`)
  })
})"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">port</span> <span class="pl-c1">=</span> <span class="pl-en">parseInt</span><span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">PORT</span><span class="pl-kos">,</span> <span class="pl-c1">10</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-c1">3000</span>
<span class="pl-k">const</span> <span class="pl-s1">dev</span> <span class="pl-c1">=</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">NODE_ENV</span> <span class="pl-c1">!==</span> <span class="pl-s">'production'</span>
<span class="pl-k">const</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-en">next</span><span class="pl-kos">(</span><span class="pl-kos">{</span> dev <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">handle</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">getRequestHandler</span><span class="pl-kos">(</span><span class="pl-kos">)</span>

<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">prepare</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-k">const</span> <span class="pl-s1">server</span> <span class="pl-c1">=</span> <span class="pl-en">express</span><span class="pl-kos">(</span><span class="pl-kos">)</span>

  <span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'/a'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">,</span> <span class="pl-s">'/b'</span><span class="pl-kos">,</span> <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">query</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>

  <span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'/b'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">,</span> <span class="pl-s">'/a'</span><span class="pl-kos">,</span> <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">query</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>

  <span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'/posts/:id'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">,</span> <span class="pl-s">'/posts'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">id</span>: <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">params</span><span class="pl-kos">.</span><span class="pl-c1">id</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>

  <span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'*'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-s1">res</span><span class="pl-kos">.</span><span class="pl-en">removeHeader</span><span class="pl-kos">(</span><span class="pl-s">'x-powered-by'</span><span class="pl-kos">)</span>
    <span class="pl-k">return</span> <span class="pl-s1">handle</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">,</span> <span class="pl-s1">res</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>

  <span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">listen</span><span class="pl-kos">(</span><span class="pl-s1">port</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-k">throw</span> <span class="pl-s1">err</span>
    <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">`&gt; Ready on http://localhost:<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">port</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<h3 dir="auto">Koa</h3>
<p dir="auto"><a href="https://custom-server-koa-wxksegmzhf.now.sh" rel="nofollow">https://custom-server-koa-wxksegmzhf.now.sh</a></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const Koa = require('koa')
const next = require('next')
const Router = require('koa-router')

const port = parseInt(process.env.PORT, 10) || 3000
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()

app.prepare()
.then(() =&gt; {
  const server = new Koa()
  const router = new Router()

  router.get('/a', async ctx =&gt; {
    await app.render(ctx.req, ctx.res, '/b', ctx.query)
    ctx.respond = false
  })

  router.get('/b', async ctx =&gt; {
    await app.render(ctx.req, ctx.res, '/a', ctx.query)
    ctx.respond = false
  })

  router.get('*', async ctx =&gt; {
    await handle(ctx.req, ctx.res)
    ctx.respond = false
  })

  server.use(async (ctx, next) =&gt; {
    ctx.res.statusCode = 200
    ctx.response.remove('X-Powered-By')
    await next()
  })

  server.use(router.routes())
  server.listen(port, (err) =&gt; {
    if (err) throw err
    console.log(`&gt; Ready on http://localhost:${port}`)
  })
})
"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-v">Koa</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'koa'</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">next</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'next'</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-v">Router</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'koa-router'</span><span class="pl-kos">)</span>

<span class="pl-k">const</span> <span class="pl-s1">port</span> <span class="pl-c1">=</span> <span class="pl-en">parseInt</span><span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">PORT</span><span class="pl-kos">,</span> <span class="pl-c1">10</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-c1">3000</span>
<span class="pl-k">const</span> <span class="pl-s1">dev</span> <span class="pl-c1">=</span> <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">NODE_ENV</span> <span class="pl-c1">!==</span> <span class="pl-s">'production'</span>
<span class="pl-k">const</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">next</span><span class="pl-kos">(</span><span class="pl-kos">{</span> dev <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">handle</span> <span class="pl-c1">=</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">getRequestHandler</span><span class="pl-kos">(</span><span class="pl-kos">)</span>

<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">prepare</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-k">const</span> <span class="pl-s1">server</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Koa</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
  <span class="pl-k">const</span> <span class="pl-s1">router</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Router</span><span class="pl-kos">(</span><span class="pl-kos">)</span>

  <span class="pl-s1">router</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'/a'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-s1">ctx</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">await</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">req</span><span class="pl-kos">,</span> <span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">res</span><span class="pl-kos">,</span> <span class="pl-s">'/b'</span><span class="pl-kos">,</span> <span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">query</span><span class="pl-kos">)</span>
    <span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">respond</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>

  <span class="pl-s1">router</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'/b'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-s1">ctx</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">await</span> <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">req</span><span class="pl-kos">,</span> <span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">res</span><span class="pl-kos">,</span> <span class="pl-s">'/a'</span><span class="pl-kos">,</span> <span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">query</span><span class="pl-kos">)</span>
    <span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">respond</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>

  <span class="pl-s1">router</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'*'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-s1">ctx</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">await</span> <span class="pl-s1">handle</span><span class="pl-kos">(</span><span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">req</span><span class="pl-kos">,</span> <span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">res</span><span class="pl-kos">)</span>
    <span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">respond</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>

  <span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-s1">ctx</span><span class="pl-kos">,</span> <span class="pl-s1">next</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">res</span><span class="pl-kos">.</span><span class="pl-c1">statusCode</span> <span class="pl-c1">=</span> <span class="pl-c1">200</span>
    <span class="pl-s1">ctx</span><span class="pl-kos">.</span><span class="pl-c1">response</span><span class="pl-kos">.</span><span class="pl-en">remove</span><span class="pl-kos">(</span><span class="pl-s">'X-Powered-By'</span><span class="pl-kos">)</span>
    <span class="pl-k">await</span> <span class="pl-s1">next</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>

  <span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-s1">router</span><span class="pl-kos">.</span><span class="pl-en">routes</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
  <span class="pl-s1">server</span><span class="pl-kos">.</span><span class="pl-en">listen</span><span class="pl-kos">(</span><span class="pl-s1">port</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-k">throw</span> <span class="pl-s1">err</span>
    <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">`&gt; Ready on http://localhost:<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">port</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<h2 dir="auto">Context</h2>


<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>5.0.0</td>
</tr>
<tr>
<td>node</td>
<td>8.8.1</td>
</tr>
<tr>
<td>OS</td>
<td>macOS 10.13.3</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
</tbody>
</table>