1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Add better documentation around url.parse (#1281)

This commit is contained in:
Marshall Bowers 2017-02-25 13:35:10 -05:00 committed by Tim Neutkens
parent 6ede206d82
commit 8a6c57de00

View file

@ -429,6 +429,8 @@ const handle = app.getRequestHandler()
app.prepare().then(() => {
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 { pathname, query } = parsedUrl