Closed azizul-bkash closed 5 years ago
@azizul-bkash it's probably bound to localhost
rather than 0.0.0.0
, try
npm start -- --host 0.0.0.0
Thanks for this @orangemug could this switch be noted in the readme or wiki?
@jdeboer-geoplan sure, would you be up for a readme PR?
@pathmapper documentation isn't really my forte, but I'll give it a look, I suppose a link to the cli options for webpack-dev-server would be most useful.
@jdeboer-geoplan no worries, what do you think about the following?
For binding to a different host than localhost
use the --host
option, e.g. npm start -- --host 0.0.0.0
binds to all hosts.
@pathmapper, great. webpack's description on https://webpack.js.org/configuration/dev-server/ is
Specify a host to use. By default this is localhost. If you want your server to be accessible externally, specify it like this: --host 0.0.0.0
@pathmapper to allow someone else to connect to my PC I had to change the config/webpack.config.js to include disableHostCheck: true, I don't suppose we'd want to put that in the docs?
@jdeboer-geoplan according to https://webpack.js.org/configuration/dev-server/#devserverdisablehostcheck this is not recommended, so we don't want to put that in the docs.
But thanks for mentioning, if someone needs this, it could be now found in this issue.
@pathmapper yes good point, don't need to accidentally encourage anyone to expose webpack-dev-server to the internet.
@jdeboer-geoplan you may want to have a look at https://github.com/maputnik/editor/issues/301#issuecomment-409580386, which suggests two more possible options.
I have tried to install Maputnik in an AWS EC2 instance with npm. But when I am trying to do
npm start
its showing the following codesThen I am trying to get access through my desktop using ip X.X.X.X:8888 but there is nothing appearing. If I use the online editor then I was unable to get access the mbtiles as a source from that EC2 instance but tile server and other things are working quietly ok from EC2. Is there any solution for me?