nvm, node, vue & vue cl

nvm

From official instruction:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

command -v nvm

Node

then

nvm install node

Vue

https://vuejs.org/v2/guide/installation.html

npm install vue

Vue CL

https://cli.vuejs.org/guide/installation.html

npm install -g @vue/cli
npm install -g @vue/cli-init

Create a Vue project

vue init webpack hello-world

Bind the webpack dev server to 0.0.0.0

vim package.json

Add --host 0.0.0.0 to webpack-dev-server argument:

 "scripts": {
    "dev": "webpack-dev-server --host 0.0.0.0 --inline --progress --config build/webpack.dev.conf.js",

pm2

npm install pm2 -g

pm2 to start npm process

pm2 --name hello start npm -- run dev

Leave a Reply

Your email address will not be published.