Richard N.
Richard N.

Reputation: 45

How do I change URL when running grunt serve?

I'm using Yeoman and uses grunt serve to look at the application in the browser.

The server starts at http://myhost.com:9000 but I want to know if it's possible to start it at http://myhost.com:9000/hello instead.

I have looked in the documentation to find something to change in the Gruntfile but couldn't find anything useful.

Upvotes: 0

Views: 561

Answers (1)

Guy
Guy

Reputation: 11305

By adding the open option you can configure the URL to open in the browser.

task: {
  options: {
    port: 9000,
    open: {
      target: 'http://myhost.com:9000/hello'
    }
  }
}

Upvotes: 0

Related Questions