该demo为vue-cli 起步,用于演示vuex状态控制,vue-router路由控制及与node.js、mongoDB等后台交互
状态管理, 主要包含store(应用状态), mutations(状态更改), actions(异步状态更改,调用mutations中的提供的方法)
vue推荐的前端路由控制, 可以进行跳转,守卫等功能
node.js是基于V8引擎的http服务器
mongoDB是非关系对象数据库, 采用BSON(类JSON)方式存储数据
A Vue.js project
# install dependencies
npm install
# start mongoDB
start mongoDB
# start node
node app.js
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test
For a detailed explanation on how things work, check out the guide and docs for vue-loader.