我希望我的feathersjs服务器只监听本地地址127.0.0.1。我尝试编辑configuration/default.json并将主机更改为";localhost";以及";127.0.0.1";
{
"host": "localhost",
"port": 3030,
"public": "../public/",
"paginate": {
"default": 10,
"max": 50
},
尽管羽毛启动消息的变化类似于:
info: Feathers application started on http://127.0.0.1:3030
没有成功,服务器仍在侦听0.0.0.0:3030
tcp6 0 0 :::3030 :::* LISTEN
请帮助
在src/index.ts/js
中更改
const server = app.listen(port);
至[app.listen(port[,host[,backback]][,callback](
const server = app.listen(port, host);