nginx-tutorial/demos/scripts/demo02-start.bat

22 lines
994 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

rem -----------------------------------------------------------------------------
rem Demo02 - 负载均衡配置Nginx/demos/nginx-1.14.0/conf/demos/demo02.conf
rem 1. 启动 Nginx
rem 2. 启动三个 JavaApp访问地址分别为
rem localhost:9021
rem localhost:9022
rem localhost:9023
rem -----------------------------------------------------------------------------
@echo off
echo ">>>> 1. Start nginx"
cd "../nginx-1.14.0"
call nginx-start.bat
echo ">>>> 2. Start 3 java app: localhost:9021, localhost:9022, localhost:9023"
cd "../javaapp"
start /min java -Dtomcat.connector.port=9021 -cp "target/JavaWebApp/WEB-INF/classes;target/JavaWebApp/WEB-INF/lib/*" io.github.dunwu.Main
start /min java -Dtomcat.connector.port=9022 -cp "target/JavaWebApp/WEB-INF/classes;target/JavaWebApp/WEB-INF/lib/*" io.github.dunwu.Main
start /min java -Dtomcat.connector.port=9023 -cp "target/JavaWebApp/WEB-INF/classes;target/JavaWebApp/WEB-INF/lib/*" io.github.dunwu.Main
pause