Guest User

Untitled

a guest
Jun 18th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. @echo off
  2. setlocal
  3.  
  4. :::::::::::::::::::::::::::::::::::::::::::::::::
  5. :: CONFIG
  6.  
  7. set DEV_ROOT=C:\Projects\djnd\parlameter
  8. set DB_ROOT=%DEV_ROOT%\parladb
  9.  
  10. set MONGO_USERNAME=
  11. set MONGO_PASSWORD=
  12.  
  13. :::::::::::::::::::::::::::::::::::::::::::::::::
  14. :: SCRIPT
  15.  
  16. :: flags
  17. if [%~1]==[] (
  18. goto :start
  19. )
  20.  
  21. if [%~1]==[-r] (
  22. goto :reboot
  23. )
  24.  
  25. if [%~1]==[-s] (
  26. goto :stop
  27. )
  28.  
  29. echo Unexpected option %~1. I don't know what to do. Valid options are -r for reboot and -s to stop.
  30. goto :EOF
  31.  
  32. :start
  33. start /b mongod --dbpath %DB_ROOT% --logpath %DB_ROOT%\parladb.log -new_console:bn
  34. set NODE_ENV=development
  35. cd %DEV_ROOT%\parlanode
  36. set NODE_ICU_DATA=node_modules/full-icu
  37. call pm2 start run.js -n parlanode -- --color
  38. cd %DEV_ROOT%\parlasite
  39. set NODE_ICU_DATA=
  40. call pm2 start run.js -n parlasite -- --color
  41. goto :EOF
  42.  
  43. :reboot
  44. cd %DEV_ROOT%\parlanode
  45. call pm2 restart parlanode
  46. cd %DEV_ROOT%\parlasite
  47. call pm2 restart parlasite
  48. goto :EOF
  49.  
  50. :stop
  51. call pm2 kill
  52. taskkill /F /IM mongod.exe
  53. goto :EOF
Add Comment
Please, Sign In to add comment