This project will show a screen to upload files and save those files in Docker Volume or Local Folder (both feature have separate branches)
To show the power of node.js and demonstrate some file-system features.
Package | Version | Description Node.js | v7.6.0 | But it should work with all versions express | v4+ | Light-Weight web framework for node.js pug | v2+ View Engine jquery | v3 client-side javascript library bootstrap | v3 client-side design library
- npm (Node Package Manager) by default ship with node.js Executable.
- Docker (Verify installation with command
docker -v) - Docker-Compose (Verify installation with command
docker-compose -v)
- Open Command Line
- Clone or Download Project (
git clone https://github.com/fahidnasir/node-dockervolumes.git) - Navigate inside folder (in this case
node-dockervolumes) - Switch to Branch
docker-container(git checkout docker-container) - run command
docker-compose buildto create docker image from existing code - run command
docker-compose upto start docker image - visit http://localhost:3000
- upload some files in browser
Note: Now you want to see the uploaded files inside the docker container
While the application is still running in docker, do these steps
- run command
docker exec <docker container id/name> sh - Now you are inside docker container navigate to the folder with files
- run command
cd /var/lib/files/to navigate into the folder - run command
lsto list all the files in the folder
npm (Node Package Manager) by default ship with node.js Executable.
- Open Command Line
- Clone or Download Project (
git clone https://github.com/fahidnasir/node-dockervolumes.git) - Navigate inside folder (in this case
node-dockervolumes) - run command
npm installto install the required packages - run command
npm startto start project - visit http://localhost:3000