Search code examples
feathersjs

I want to make feathersjs listening on 127.0.0.1 (not on 0.0.0.0)


i want my feathersjs server to listen just to the local address 127.0.0.1. I tried editing configuration/default.json and changing host to "localhost" and "127.0.0.1"

{
  "host": "localhost",
  "port": 3030,
  "public": "../public/",
  "paginate": {
    "default": 10,
    "max": 50
  },

Though the feathers startup message changes like:

info: Feathers application started on http://127.0.0.1:3030

No success, server is still listening to 0.0.0.0:3030

tcp6       0      0 :::3030                 :::*                    LISTEN     

please help


Solution

  • In src/index.ts/js change

    const server = app.listen(port);
    

    To [app.listen(port[, host[, backlog]]][, callback])

    const server = app.listen(port, host);