Skip to content

Commit

Permalink
Close GH-373: add --allow-remote option to serve task.
Browse files Browse the repository at this point in the history
  • Loading branch information
cgcgbcbc authored and sindresorhus committed May 14, 2014
1 parent 3ae2eb1 commit 27d5e5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/templates/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,10 @@ module.exports = function (grunt) {
});


grunt.registerTask('serve', function (target) {
grunt.registerTask('serve', 'start the server and preview your app, --allow-remote for remote access', function (target) {
if (grunt.option('allow-remote')) {
grunt.config.set('connect.options.hostname', '0.0.0.0');
}
if (target === 'dist') {
return grunt.task.run(['build', 'connect:dist:keepalive']);
}
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ For more information on what `generator-webapp` can do for you, take a look at t

- Install: `npm install -g generator-webapp`
- Run: `yo webapp`
- Run `grunt` for building and `grunt serve` for preview[*](#serve-note)
- Run `grunt` for building and `grunt serve` for preview[*](#serve-note). `--allow-remote` option for remote access.


#### Third-Party Dependencies
Expand Down

0 comments on commit 27d5e5c

Please sign in to comment.