VUE project learning (1): build a VUE front-end project
1. Install the node.js environment
(1) Download node.js, the download address is: https://nodejs.org/en/
(2) Install node according to the default options, check the installation version
(3) Configure the download mirror, the mirror address is: http://npm .taobao.org/ , after the installation is successful, you can directly use cnpm instead of npm command
npm install -g cnpm –registry=https://registry.npm.taobao.org
Check if cnpm is installed successfully
2. Build a vue project
(1) Install VUE scaffolding vue-cli globally, execute the command:
npm install --global vue-cli
The interface for successful installation is:
(2) Select the project directory and create a new VUE project based on the webpack template. The project download command is:
vue init webpack demo
In the project configuration interface, you can refer to the following figure description: After the
project is successfully downloaded, the following figure is shown:
(3) Start the project, enter the root directory where the project is located, and run the project start command:
npm run dev
After the project is started successfully, the interface is as follows:
Enter: http://localhost:8080 in the address bar of the browser, and the following interface appears, indicating that the initial project is successfully built, and personalized front-end development is ready!