grunt-open icon indicating copy to clipboard operation
grunt-open copied to clipboard

Open html file using Grunt open

Open mehmedju opened this issue 11 years ago • 1 comments

I made grunt open task on the next way: module.exports = function(grunt) {

grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), open : {

        AngularSeedApp : {
            path: 'http://127.0.0.1:8888/app/index.html',
            //app: 'Google Chrome'
        },

}); grunt.loadNpmTasks('grunt-open');

After this I run in command line: grunt open and chrome runs and I got this Oops! Google Chrome could not connect to 127.0.0.1:8888

Try reloading: 127.­0.­0.­1:­8888/­app/­index.­html

How I can solve this issue that I get my preview of index.html in browser (chrome is my default).

mehmedju avatar Feb 20 '14 09:02 mehmedju

Nothing seems to be running on port 8888 of your local machine, you need to be pointing it to a url you can reasonably expect something to exist at. If grunt is also spinning up a server, then you need to make sure the server is started before the open task is called.

jsoverson avatar Mar 22 '14 23:03 jsoverson