How to use grunt serve in Cloud9 IDE?

后端 未结 3 1713
悲&欢浪女
悲&欢浪女 2020-12-30 08:49

In my Gruntfile.js I have tried to do this:

connect: {
  options: {
    port: process.env.PORT,
    hostname: process.env.IP,
    livereload: 35729
  }
}
         


        
3条回答
  •  臣服心动
    2020-12-30 09:20

    Update: On Cloud9, you can use ports 8080, 8081, and 8082 to make this work. For details and an example, you can look at Multiple Ports.


    In Cloud9, port 8080 is the only externally accessible port, so please change 9000 to 8080. The port is in use by another process, which should be stopped first. Use:

    kill -9 $(lsof -i:8080 -t)
    

    and restart grunt. That will work.

提交回复
热议问题