Is it possible to serve multiple Jekyll sites locally?

前端 未结 6 1490
旧时难觅i
旧时难觅i 2021-02-18 13:01

Every time I serve a Jekyll site from the command line it is served on port 4000. Two sites can\'t be served on the same port.

Is it possible to serve multiple Jekyll si

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-18 13:14

    If you run it on mac docker client, provide host IP 0.0.0.0 will save your time a ton.

    jekyll serve --port 4001 --host 0.0.0.0
    

    By default, 127.0.0.1 is used for localhost and its NIC cannot receive any traffic from your mac host, whereas 0.0.0.0 means to accept traffic on all NICs

提交回复
热议问题