In order to run the code/app for hashing on your computer, you need ANY ONE installed on your computer.
❗ With Docker Desktop it would be much easier, as you will be able to run most of the code examples in my other videos.
The hashing demo can be run by ANY of the following methods. Once the app is up and running, it can be viewed through your browser at the address -> http://localhost
If you have docker installed on your computer, you can simply use the following command:
-
Start the app (this will print a container name)
docker-compose up --build -d .... some logs ... ✔ Network cd_006_hashing_default Created 0.0s ✔ Container cd_006_hashing-hashing_app-1 Started
-
Stop the app
docker-compose down
-
View Logs: Copy the container name from the first command and then use it in the following command
docker logs <container_name> #Example docker logs cd_006_hashing-hashing_app-1
If you have nginx installed on your computer, simply copy all the html, css and javascript files from this directory,
to the nginx root directory (can be viewed from nginx.conf
).
For more details, see the Nginx docs.
Once the files are copied into the root directory, start the server and you should be able to see the app at http://localhost
If you don't want to use docker-compose
, you can use the build and run commands separately.
- Build Command
docker build -f app.Dockerfile -t docker_hashing_image .
- Run Command (Use
CMD+C
orCTRL+C
to shut down)docker run -p 80:80 docker_hashing_image