Learning Full-Stack JavaScript Development: MongoDB, Node and React
Prepare Environment for Development
$ project_name=learning-full-stack-javascript-development-mongodb-node-and-react
$ echo $project_name
learning-full-stack-javascript-development-mongodb-node-and-react
$ project_folder=~/projects/dev/js/nodejs/
$ echo $project_folder
$ mkdir -p ${project_folder}/${project_name}
$ docker run -it \
-p 80:8080 -p 1337:1337 -p 3000:3000 -p 4000:4000 -p 5000:5000 -p 6000:6000 -p 7000:7000 -p 8000:8000 -p 9000:9000 \
--name ${project_name} \
-v ${project_folder}/${project_name}:/project \
node \
/bin/bash
# apt-get update
# apt-get install -y vim git
# mkdir -p /usr/local/lib/node_modules/
# username=developer
# adduser --disabled-password --gecos "" ${username}
# chown -R ${username} /project/
# su - ${username}
$ vi ~/.bashrc
In the bottom I am add
###############################
# USER DEFINED
. ~/.bash_profile
###############################
$ echo "export PS1='$ '" >> ~/.bash_profile
$ echo 'export PATH=$PATH:./node_modules/.bin' >> ~/.bash_profile
$ source ~/.bash_profile