# hybrid-NodeVuejs ! ## LabInstance Node VueJS ![alt text](images/swarmlab-network.png "") ## Quickstart This is a quickstart guide of howto use this *LabInstance to deploy Vue js applications* ### HowTo use it ### Default Configuration - Working Directory > /home/docker/project - Default user > docker - Default password > docker - Default password4root > pass #### Find lab workers > ifconfig > > nmap -sP 172.130.0.0/24 > > or > > /home/docker/project/bin/swarmlab-nmap #### connect to workers ```bash ssh docker@[IP] ``` #### Create hosts file ```bash /home/docker/project/bin/swarmlab-nmap > /home/docker/project/hosts ``` --- **NOTE:** copy files to all clients ```bash while read -r line; do scp /home/docker/project/file docker@$line:/some_dir/file done < /home/docker/project/hosts ``` --- ### Vue CLI Documentation https://cli.vuejs.org/guide/creating-a-project.html#vue-create #### Creating a Project ```bash vue create hello-world ``` #### Run it! ```bash npm run serve ``` #### Open it! ```bash http://localhost:8080 ``` :warning: Publishing Docker ports via -p Using the -p (lower case) flag at runtime lets you publish a container’s specific port(s) to the Docker host. ```bash docker exec -it -udocker -p [host-port]:[expose-port*] hybrid-nodevuejs_master_1 /bin/bash e.g. docker exec -it -udocker -p 8080:8080 hybrid-nodevuejs_master_1 /bin/bash ^^^^^^^^^^^ ``` > > (*) this is the port found in the container menu. > > We would expect the port number do be next to the "Ports" field. >