찾다

 >  Q&A  >  본문

node.js - req.query is not a function

var express = require('express');
var app = new express();

//http://localhost:3000/article?id=1
app.get('/article',function(req, res) {
    var aId = req.query("id");
}

报错 TypeError: req.query is not a function
使用req.query要导入其他?

PHP中文网PHP中文网2872일 전893

모든 응답(1)나는 대답할 것이다

  • 巴扎黑

    巴扎黑2017-04-17 15:42:45

    http://expressjs.com/en/4x/ap...

    쿼리 문서에는 이런 내용이 적혀 있는 것 같습니다

    으아아아

    회신하다
    0
  • 취소회신하다