YZ
Size: a a a
YZ
NN
NN
NN
NN
🦜
NN
NN
BB
🦜
NN
BB
BB
BB
BB
You add the route to express (or any other server) on server.js file (this is only for SSR). This will route the url /post/:slug to pages/post.js and provide slug as part of query in getInitialProps.
server.get('/post/:slug', (req, res) => {
return app.render(req, res, '/post', { slug: req.params.slug })
})
BB
EM