1
  1. this is my gruntfile.
  2. i run $ grunt default
  3. actuall i want to up my index.html on some port and want it to open in chrom directly

      module.exports = function(grunt) {
      grunt.initConfig({
     connect: {
        server: {
          options: {
            port: 9001,
            base: {
              path: 'Dev',
              options: {
                index: 'index.html',
                maxAge: 300000
              }
            }
          }
        }
      },
       open: {
        delayed: {
          path: 'http://localhost:9001'
          app: 'Google Chrome'
          options: {
            openOn: 'serverListening'
          }
        }
      }     
      });
    grunt.registerTask('default', ['connect', 'open']);
    };
    
mohit bansal
  • 11
  • 1
  • 3

1 Answers1

0

You need to load the task:

grunt.loadNpmTasks('grunt-contrib-connect');
gramuc
  • 85
  • 6