const express = require('express')
const app = express()
var ipgeoblock = require("node-ipgeoblock")
var server=app.listen(3000, function () {
var host=server.address().address;
var port=server.address().port
console.log('Example app listening on port 3000!',host,port)
});
app.use(ipgeoblock({
geolite2: "./GeoLite2-Country.mmdb",
blockedCountries: [ "FR", "GB", "IN"]
}));
app.get('/', function (req, res) {
res.send('Hello World!')
})
此代码有什么问题,是否存在本地主机问题,为什么我无法阻止国家