Perequists:
- already installed docker
Add .env file to your folder before start.
PORT = 3000
-
Building your image:
$ docker build -t <your username>/node-web-app .
-
Run the image:
$ docker run -p 3000:8080 -d <your username>/node-web-app .
-
You can access your app logs by executing
$ docker logs <container id>
where containerID is obtained from containers look up using
docker ps
Console output:
Server is ready on http://localhost:8080/graphql
-
Now you can test your app at http://localhost:3000/graphql.
-
Use resolver
status
to get information about your app:
{
status
}