我不知道为什么会收到此错误。但是它不应该来。我也尝试使用代理。因为这个zillow api是非常好的响应式api。
var app = require('express')();
var cors = require('cors');
app.options('*', cors());
app.use(cors());
var proxy = require('express-http-proxy');
app.use('/proxy', proxy('www.google.com'));
const Zillow = require("node-zillow")
const zillow = new Zillow('X1-ZWz1894yvb2z2j_9prl8')
const parameters = {
address: "2114 Bigelow Ave N",
citystatezip: "Seattle, WA",
}
app.get("/getdetails", async (req, res, next) => {
console.log("***")
await zillow.get('GetDeepSearchResults', parameters)
.then(function(data) {
req.data = data
})
res.json(req.data);
});
app.listen(3000, () => {
console.log("Server running on port 3000");
})