Install the node
NPM is packaged with Node and downloaded from the official website.
Go to the installation directory $cd /usr/localFrom the official website to download the node $$tar XZVF wget https://nodejs.org/download/release/v12.13.0/node-v12.13.0-linux-x64.tar.gz decompression The node - v12.13.0 - Linux - x64. Tar. GzCopy the code
Setting environment Variables
Set NODE_HOME and add it to PATH.
$ export NODE_HOME=/usr/local/ node - v12.13.0 - Linux - x64 $export PATH=$NODE_HOME/bin:$PATH
Copy the code
Verifying the Installation
node -v
npm -v
Copy the code
Install GCC
yum install gcc-c++
Copy the code
Create any project directory and copy the project to the following directory
Import project dependency packages
npm ci
Copy the code
Start the server
If you want to write code without restarting the server, you can use hot boot
npm run dev
Copy the code
Ordinary start
npm run build
npm run start
Copy the code