salix/dev.cmd

31 lines
701 B
Batchfile

@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
:caseStart
call "%0" stop
echo "################################ Starting services"
call forever start forever.json
call forever list
call start /b nginx -c "%nginxConf%" -p "%nginxPrefix%"
cd @salix
gulp
goto caseExit
:caseStop
echo "################################ Stoping services"
forever stopall
nginx -c "%nginxConf%" -p "%nginxPrefix%" -s stop
goto caseExit
:caseUsage
echo "Usage: %0 [start|stop]"
:caseExit