Git Product home page Git Product logo

node-dockervolumes's Introduction

Intro

This project will show a screen to upload files and save those files in Docker Volume or Local Folder (both feature have separate branches)

Why?

To show the power of node.js and demonstrate some file-system features.

Technologies/Packages

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

Docker Setup

Pre-Requities

  • 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)

Steps to run docker data container sample

  1. Open Command Line
  2. Clone or Download Project (git clone https://github.com/fahidnasir/node-dockervolumes.git)
  3. Navigate inside folder (in this case node-dockervolumes)
  4. Switch to Branch docker-container (git checkout docker-container)
  5. run command docker-compose build to create docker image from existing code
  6. run command docker-compose up to start docker image
  7. visit http://localhost:3000
  8. upload some files in browser

Note: Now you want to see the uploaded files inside the docker container

Want to see Uploaded Files in Docker?

While the application is still running in docker, do these steps

Steps

  1. run command docker exec <docker container id/name> sh
  2. Now you are inside docker container navigate to the folder with files
  3. run command cd /var/lib/files/ to navigate into the folder
  4. run command ls to list all the files in the folder

Local Setup

Pre-Requities

npm (Node Package Manager) by default ship with node.js Executable.

Steps to run local folder sample

  1. Open Command Line
  2. Clone or Download Project (git clone https://github.com/fahidnasir/node-dockervolumes.git)
  3. Navigate inside folder (in this case node-dockervolumes)
  4. run command npm install to install the required packages
  5. run command npm start to start project
  6. visit http://localhost:3000

node-dockervolumes's People

Contributors

fahidnasir avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.