Commit 8a6c57de authored by Marshall Bowers's avatar Marshall Bowers Committed by Tim Neutkens

Add better documentation around url.parse (#1281)

parent 6ede206d
...@@ -429,6 +429,8 @@ const handle = app.getRequestHandler() ...@@ -429,6 +429,8 @@ const handle = app.getRequestHandler()
app.prepare().then(() => { app.prepare().then(() => {
createServer((req, res) => { createServer((req, res) => {
// Be sure to pass `true` as the second argument to `url.parse`.
// This tells it to parse the query portion of the URL.
const parsedUrl = parse(req.url, true) const parsedUrl = parse(req.url, true)
const { pathname, query } = parsedUrl const { pathname, query } = parsedUrl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment