Reputation: 21
there. I´m starting on VueJS, creating a project in codeanywhere:
npm install -g vue-cli
vue init webpack myProject
So, when i run npm run dev
i get a
Your application is running here: http://localhost:8080
Because, i am developing on a cloud based IDE, i´cant access http://localhost... So, i access the way Codeanywhere publish when you create a project:
But i get a
This Container is currently unaccessible.
Really appreciated any help.
Upvotes: 1
Views: 824
Reputation: 11
Work for me with nuxt.config.js :
server: {
port: 3000,
host: '0.0.0.0',
timing: false
},
Upvotes: 1
Reputation: 91
I created a vue.config.js file at the root (next to package.json) with content:
module.exports = {
devServer: {
host: '0.0.0.0',
allowedHosts: [
'.codeanyapp.com'
]
}
};
Upvotes: 4
Reputation: 1691
From the Codeanywhere documentation:
You have to change the default IP so your Container could run externally.
Please change IP address on your container from 127.0.0.1 to 0.0.0.0.
Upvotes: 2