zoukankan      html  css  js  c++  java
  • 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 就可以看到欢迎页面了。

  • 相关阅读:
    什么是大小端
    mina
    出现jar包找不到的问题解决方案
    InnoDB 静态数据加密的常见问题合集
    mysqldump 数据库备份程序,mysqldump 选项合集
    出现The MySQL server is running with the --secure-file-priv option so it cannot问题的原因
    小睡一会,做了一个梦
    IntelliJ IDEA is a solution that appears after importing a project with a clock icon(idea导入项目之后出现时钟的解决方案)
    IntelliJIDE不显示项目文件夹的问题
    夏天的记忆
  • 原文地址:https://www.cnblogs.com/maobuji/p/10124789.html
Copyright © 2011-2022 走看看