salix/dev.cmd

31 lines
712 B
Batchfile
Raw Normal View History

@echo off
set currentDir=%~dp0
set nginxPrefix=%currentDir%\services\nginx
set nginxConf=%nginxPrefix%\conf-dev.conf
if "%1"=="" goto caseStart
if "%1"=="start" goto caseStart
if "%1"=="stop" goto caseStop
goto caseUsage
2016-11-21 07:35:05 +00:00
:caseStart
call "%0" stop
echo "################################ Starting services"
call forever start forever.json
call forever list
call nginx -c "%nginxConf%" -p "%nginxPrefix%"
call cd @salix
call gulp
goto caseExit
2016-11-21 07:35:05 +00:00
:caseStop
echo "################################ Stoping services"
call forever stopall
call nginx -c "%nginxConf%" -p "%nginxPrefix%" -s stop
goto caseExit
2016-11-21 07:35:05 +00:00
:caseUsage
echo "Usage: %0 [start|stop]"
2016-11-21 07:35:05 +00:00
:caseExit