Eggjs startup problem

how to change the host that eggjs starts by default
as shown in the figure, the default is 127.0.0.1. I want to change it to my local ip address. How can I change it

?

clipboard.png

May.10,2021

you can do a full-text search of 127.0.0.1
and then replace


you need to know about localhost and 127.0.0.1.

you can find out by using your own ip access.


.

1. config/config.default.js add

  config.cluster = {
    listen: {
      port: 9000,//
      hostname: '10.100.23.129', //IP
    },
  };
  

* * I don't blame the landlord. It does seem to be hidden in the official Quick start. You can modify it by directly finding listen in
koa . * *

Menu