grunt server can't be connected

后端 未结 4 2141
借酒劲吻你
借酒劲吻你 2021-02-07 14:50
module.exports = function(grunt) {

  // Project configuration.
    grunt.initConfig({
      server: {
        port: 8888,
        base: \'.\'
      }
    });

};

C:\\P         


        
4条回答
  •  南旧
    南旧 (楼主)
    2021-02-07 15:46

    In grunt 0.4 combined with grunt-contrib-connect you can run a long running server by using the keepalive argument: grunt connect:target:keepalive or define it as an option in your config:

    grunt.initConfig({
      connect: {
            target:{
                options: {
                    port: 9001,
                    keepalive: true
                }
            }
        }
    });
    

提交回复
热议问题