How can you specify UI port for lite-server?

前端 未结 2 379
一个人的身影
一个人的身影 2020-12-11 16:16

When you start up lite-server, you can specify port for example

lite-server -- port 8000

Which gives you the following result:

<         


        
2条回答
  •  借酒劲吻你
    2020-12-11 16:55

    Since lite-server uses browsersync, it can be changed via BrowserSync options

    Not sure about command line parameter, but bs-config.json works like this:

    {
      "port": 8000,
      "files": ["./dist/**/*.{html,htm,css,js}"],
      "server": { "baseDir": "./" },
      "ui": {
        "port": 8001
      }
    }
    

    BrowserSync command line options (that also work with lite-server)

提交回复
热议问题