zoukankan      html  css  js  c++  java
  • 部署(6.前端项目)

    1.安装node、npm、cnpm

    apt install nodejs
    y
    apt install npm
    y
    node -v
    npm -v

    npm install cnpm -g --registry=HTTPS://registry.npm.taobao.org;
    cnpm -v

    2.安装依赖

    cd demo
    cnpm install

    3.将路由模式改成history模式:

    vim src/router/index.js

    4.打包

    npm run build

    5.配置Nginx

    #加入配置
    server{
      listen 80;
      server_name 49.234.49.146;
      location / {
        root /home/ubuntu/demo/dist;
        index index.html;
      }
    }

  • 相关阅读:
    MD5 Hashing in Java
    Caching in Presto
    ORC 文件存储格式
    Presto 性能优化点
    数据分页问题
    ES
    ES
    ES
    ES
    ES
  • 原文地址:https://www.cnblogs.com/xuepangzi/p/12230941.html
Copyright © 2011-2022 走看看