nodebeginner.org icon indicating copy to clipboard operation
nodebeginner.org copied to clipboard

Is this one a typo?

Open knowncold opened this issue 7 years ago • 1 comments

http://www.nodebeginner.org/index-zh-cn.html#whats-needed-to-route-requests I'm a beginner and I find something wrong when I console.log(querystring(string)["foo"] ); That querystring is not a function

                               url.parse(string).query
                                           |
           url.parse(string).pathname      |
                       |                   |
                       |                   |
                     ------ -------------------
http://localhost:8888/start?foo=bar&hello=world
                                ---       -----
                                 |          |
                                 |          |
              querystring(string)["foo"]    |
                                            |
                         querystring(string)["hello"]

knowncold avatar Oct 04 '16 07:10 knowncold

You can access the query params like below:

let {params} = req.query

kunal8411 avatar Apr 01 '23 07:04 kunal8411