First, you need to package some Nuxt projects. For details, you can refer to the article
Nuxt packaging and deployment to run in the local environment.
Then you need to buy a set of Alibaba Cloud server. You can refer to the article
Buying an Alibaba Cloud server and access it
. Then you need to install SSH on your computer. You can refer to the article
Windows system installation SSH
then zip the installed Nuxt project folder into a package
Log in to the server remotely
and then you need to install a node on the server. You can refer to the article
Alibaba Cloud Linux cloud server to install the specified version of node.js.
Go back to our own computer and open the command line tool in the directory where the Nuxt project is packaged.
Enter commands in the command window
scp -r ./nuxdom.zip 用户名@服务器公网地址:/root
Here I specify that the file to be uploaded is nuxdom.zip in the current directory, and then the server user name@server public network address public network address. You have to go to the instance management to check the user name. If you haven’t touched it, it is usually root and then: Which directory to transfer to the server? I chose root
to connect for the first time. He will let us confirm that we enter y and press Enter.
Then the system will ask us to enter the password, and we can enter it normally. If it
succeeds, the location will output the file information.
We will remotely connect to the server again and enter ll in the command window to check it.
Doesn’t he have it?
We enter pwd to come to the root directory and
then we Introduce the unzip command
input
sudo yum update
There is no way to use it here, you have to agree to
enter y and press Enter
and then execute
sudo yum install unzip
Ask if you agree or want to use it, just press y obediently and then press Enter
Then unzip the file
unzip nuxdom.zip
It means that after decompressing the nuxdom.zip in the current directory, it is
decompressed
cd nuxdom
Enter the nuxdom directory,
first you need to confirm your node server and computer version have been
entered
npm i
Install the dependencies
and run the project in Poison Ang
npm run start
Here we enter y and press Enter
The project is running on the server