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:
parent
6ede206d82
commit
8a6c57de00
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue