Node JS build a Vue and start it

Source: Internet
Author: User
Tags install node

Install node JS to the simple process of running Vue

1. Install node JS
:http://nodejs.cn/download/
2. Run node. js Command PromptAfter installation is complete (node-v View installed version)

  
3, install NPM (since the current version of Nodejs has integrated NPM so there is no need to install, you can use npm-v to view the version)

  
4, register CNPM to replace NPM
Using the command:npm install cnpm-g--registry=https://registry.npm.taobao.org
5. Installing Vue Scaffolding VUE-CLI
Command:npm install-g vue-cli

  after successful installation, you can view the Vue version with vue-v
6, CD to the corresponding directory under the initialization of VUE project
command:vue init webpack my-project
Project Name Item name
Project Description Item Name Description
Author Author Email
use ESLint to lint your code? Eslist Syntax Check required
Setup unit tests with Karma + Mocha? Unit Test Required
Setup e2e tests with Nightwatch? Yes if you need e2e test
7,Package.json for the project depends on resources, if you want to run this project requires the use of cnpm install dependencies
8. Using the command npm run dev startup project, the browser will open http://localhost:8080/#/see the following effects

Development is a hot deployment state, the browser automatically refreshes after the code is saved, and the error message is very friendly.

9. Compiling and packaging NPM Run Build

The package will be compiled into the Project Dist folder

Wanglu Date: 2017/6/21

Node JS build a Vue and start it

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.