Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal
- :::::::::::::::::::::::::::::::::::::::::::::::::
- :: CONFIG
- set DEV_ROOT=C:\Projects\djnd\parlameter
- set DB_ROOT=%DEV_ROOT%\parladb
- set MONGO_USERNAME=
- set MONGO_PASSWORD=
- :::::::::::::::::::::::::::::::::::::::::::::::::
- :: SCRIPT
- :: flags
- if [%~1]==[] (
- goto :start
- )
- if [%~1]==[-r] (
- goto :reboot
- )
- if [%~1]==[-s] (
- goto :stop
- )
- echo Unexpected option %~1. I don't know what to do. Valid options are -r for reboot and -s to stop.
- goto :EOF
- :start
- start /b mongod --dbpath %DB_ROOT% --logpath %DB_ROOT%\parladb.log -new_console:bn
- set NODE_ENV=development
- cd %DEV_ROOT%\parlanode
- set NODE_ICU_DATA=node_modules/full-icu
- call pm2 start run.js -n parlanode -- --color
- cd %DEV_ROOT%\parlasite
- set NODE_ICU_DATA=
- call pm2 start run.js -n parlasite -- --color
- goto :EOF
- :reboot
- cd %DEV_ROOT%\parlanode
- call pm2 restart parlanode
- cd %DEV_ROOT%\parlasite
- call pm2 restart parlasite
- goto :EOF
- :stop
- call pm2 kill
- taskkill /F /IM mongod.exe
- goto :EOF
Add Comment
Please, Sign In to add comment