networking - How to request grunt serve from host machine? -
trying setup angular on virtual machine yeoman avoid breaking machine packages management.
after generate project yo myproject
, install angular globally & locally, install grunt bower , more dependencies, i'm able run server using grunt serve
the localhost
accessible vm via wget localhost
, not load host.
i've tried modifying file /etc/network/interface
static address , accessing static ip browser, , set dynamic dhcp port forwarding
none have worked, browser can't make connection:
firefox can't establish connection server @
i upload more useful files/output give more context, new grunt user have no idea look.
set connect-middleaware listen on 0.0.0.0 ip address ensure host accessible.
you can edit gruntfile.js this.
find connect
task in grunt.initconfig({});
change hostname in options
0.0.0.0
it should this:
// actual grunt server settings connect: { options: { port: 9000, // change '0.0.0.0' access server outside. hostname: '0.0.0.0', livereload: 35729 }, livereload: { options: { open: true, base: [ '.', 'examples' ] } } },
run grunt serve
, try use vm ip access ip host. should available.
Comments
Post a Comment