• springboot+VUE(一)


     https://segmentfault.com/blog/wangjihong

    安装nodejs与NPM

    下载nodejs的LTL版本,并安装

    https://nodejs.org/en/

    执行node -v检查版本

    npm在安装nodejs的时候会自动安装,使用以下命令更新npm到最新版本

    npm -g install npm
    npm -v

     安装淘宝npm

    npm install cnpm -g --registry=https://registry.npm.taobao.org

    安装vue-cli手脚架

    cnpm install -g vue-cli

    cmd进入你想创建工程的目录,指定工程目录,就可以开始创建工程了

    vue init webpack project-dir
    • Project name (project-dir)  如果不改就默认使用目录名,当作工程名,工程名允许出现大写字母 
    • Project description (A Vue.js project)  工程描述
    • Author (maobuji <16770864@qq.com>) 工程作者
    • Vue build (Use arrow keys): 有两个选项,推荐第一个

             Runtime + Compiler: recommended for most users  运行加编译

             Runtime-only: about 6KB lighter min+gzip, but templates (or any Vue-specific HTML) are ONLY allowed in .vue files - render functions are required elsewhere

    • Install vue-router? (Y/n)   安装vue-router
    • Use ESLint to lint your code? (Y/n)  

              Standard (https://github.com/standard/standard)

              Airbnb (https://github.com/airbnb/javascript)

              none (configure it yourself)

    • Set up unit tests (Y/n)

              Jest

              Karma and Mocha

              none (configure it yourself)

    • Setup e2e tests with Nightwatch? (Y/n)

            Should we run `npm install` for you after the project has been created? (recommended) (Use arrow keys)

               Yes, use NPM

               Yes, use Yarn

               No, I will handle that myself

    基本上一路回车下来,就可以了。

    编译运行项目

    cnpm install
    
    npm run dev

    如果install不成功,可以尝试运行  cnpm rebuild node-sass

    执行run dev以后系统就会启动了,config/index.js文件中,提供了启动端口。默认是8080

    访问http://localhost:8080 就可以看到欢迎页面了。

  • 相关阅读:
    数组静态初始化和动态初始化
    一维数组
    标识符啊
    常量定义
    11.08问题总结
    毕设(10.30)
    毕设(10.29)
    毕设(10.28)
    毕设(10.27)
    毕设(10.26)
  • 原文地址:https://www.cnblogs.com/maobuji/p/10124789.html
Copyright © 2020-2023  润新知