我想使用Express發送AJAX請求。我運行的代碼如下所示:我如何使用Express框架製作AJAX請求?
var express = require('express');
var app = express();
app.get('/', function(req, res) {
// here I would like to make an external
// request to another server
});
app.listen(3000);
我該怎麼做?
文檔:https://開頭的NodeJS .org/api/http.html#http_http_request_options_callback – mauronet