🔖 demo06
parent
eeb32fdb84
commit
02cc3daf29
|
@ -0,0 +1,13 @@
|
|||
#-------------------------------------------
|
||||
# 设置文件服务器
|
||||
# root 为提供文件服务的根路径
|
||||
#-------------------------------------------
|
||||
|
||||
server {
|
||||
server_name www.demo06.com; # 你的域名或者 ip
|
||||
root D:/Codes/ZP/Others/nginx-tutorial/demos/reactadmin/build; # 你的克隆到的项目路径
|
||||
index index.html; # 显示首页
|
||||
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|js|pdf|txt){
|
||||
root D:/Codes/ZP/Others/nginx-tutorial/demos/reactadmin/build;
|
||||
} # 静态文件访问
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
@echo off
|
||||
rem -------------------------------------------------
|
||||
rem The script is use to package reactadmin
|
||||
rem Env: Nodejs 8.x
|
||||
rem -------------------------------------------------
|
||||
|
||||
pushd %~dp0..\reactadmin
|
||||
|
||||
echo ">>>> 1. Delete node_modules"
|
||||
rd /s /q node_modules
|
||||
|
||||
echo ">>>> 2. npm install"
|
||||
rem 安装本地依赖
|
||||
call cnpm install
|
||||
|
||||
echo ">>>> 3. npm run prod"
|
||||
rem 构建生产环境,构建的静态资源文件在 dist 目录
|
||||
call npm run prod
|
||||
|
||||
popd
|
||||
|
||||
pause
|
Loading…
Reference in New Issue