Cannot access web server using docker

后端 未结 2 1508
陌清茗
陌清茗 2021-01-27 21:30

I used the following command to run the container :

docker run -p 3333:3333 -d maill/node-web-app

Here is the result of docker ps :

<         


        
2条回答
  •  无人及你
    2021-01-27 21:35

    To go along with johnharris85's answer, add the following to your package.json:

    From nuxt documentation on "How to edit HOST and PORT?"

    You can configure the PORT with 3 different ways:

    1. ...
    2. ...
    3. Via a nuxt config in the package.json:

    Inside your package.json:

    "config": {
     "nuxt": {
       "host": "0.0.0.0",
       "port": "3333"
     }
    },
    "scripts": {
     "dev": "nuxt"
    }
    

提交回复
热议问题