🔖 script
parent
3a0917023e
commit
4fce455fe0
|
@ -0,0 +1,22 @@
|
|||
rem -------------------------------------------------
|
||||
rem The script is use to package JavaWebApp
|
||||
rem Env: Nodejs 8.x
|
||||
rem -------------------------------------------------
|
||||
|
||||
@echo off
|
||||
|
||||
rem 删除 dist 目录
|
||||
cd ../reactapp
|
||||
|
||||
echo ">>>> 1. Delete node_modules"
|
||||
rd /s /q node_modules
|
||||
|
||||
echo ">>>> 2. npm install"
|
||||
rem 安装本地依赖
|
||||
call npm install
|
||||
|
||||
echo ">>>> 3. npm run prod"
|
||||
rem 构建生产环境,构建的静态资源文件在 dist 目录
|
||||
call npm run prod
|
||||
|
||||
pause
|
|
@ -0,0 +1,17 @@
|
|||
rem -----------------------------------------------------------------------------
|
||||
rem Demo04 - 动静分离
|
||||
rem 1. 启动 Nginx
|
||||
rem 2. 启动一个 JavaApp,访问地址分别为:
|
||||
rem localhost:9040
|
||||
rem -----------------------------------------------------------------------------
|
||||
@echo off
|
||||
echo ">>>> 1. Start nginx"
|
||||
cd "../nginx-1.14.0"
|
||||
call nginx-start.bat
|
||||
|
||||
echo ">>>> 2. Start 3 java app: localhost:9040"
|
||||
cd "../javaapp"
|
||||
start /min java -Dtomcat.connector.port=9040 -cp "target/JavaWebApp/WEB-INF/classes;target/JavaWebApp/WEB-INF/lib/*" io.github.dunwu.Main
|
||||
pause
|
||||
|
||||
|
Loading…
Reference in New Issue