我的github

第一步:打包

第二步:地址映射

http{                                           
  server{                                        
    listen       8080;                      #设置端口号8080
    server_name  localhost;                 #主机域名
    location / {                                      
       root   C:/vue/dist;                 #dist文件夹路径
       index  index.html index.htm;        #项目首页
    }
  }
}

启动nginx,浏览器输入 http://localhost:8080 便可以访问到我们打包后的vue项目。

参考:https://mp.weixin.qq.com/s/o_Kvn2yoi_UOlKwIEx9CVA

posted on 2024-03-08 14:34  XiaoNiuFeiTian  阅读(43)  评论(0编辑  收藏  举报