dl3c01n
dl3c01n

Reputation: 17

How to make my VueCLI webpack-simple accessible in LAN (192.168.1.73:8080)?

I am making my own VueJS project, and i built it with this command :

vue-cli webpack-simple

Then, i create my own components, everything is working, following this, i run that command :

npm run dev

It perfectly works, no errors, and i want to see if my project is responsive, so i went on my smartphone, and tried :

192.168.1.73:8080

Error:

192.168.1.73 doesn't allow connexion.

I already tried to add :

'webpack-dev-server/client?http://0.0.0.0:8080',

Same result, inside my cmd.exe it says :

cross-env NODE_ENV=development webpack-dev-server --open --hot

Thank you for replying.

Upvotes: 0

Views: 640

Answers (1)

Luis Orduz
Luis Orduz

Reputation: 2887

In your package.json, change the dev script.

By default, it is:

cross-env NODE_ENV=development webpack-dev-server --open --hot

Which defaults to localhost, so you can use this:

cross-env NODE_ENV=development webpack-dev-server --open --hot --host 0.0.0.0

Upvotes: 2

Related Questions