build_and_run.sh 516 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. which mongo
  3. if [ $? -ne 0 ]; then
  4. echo "mongo command is not available, please make sure mongodb is installed and added to the system path."
  5. return 1
  6. fi
  7. mongo --eval "db.stats()"
  8. if [ $? -ne 0 ]; then
  9. echo "mongodb not running"
  10. return 1
  11. else
  12. echo "mongodb is online..."
  13. fi
  14. echo building MineCase...
  15. cd src
  16. dotnet restore
  17. dotnet build -c debug
  18. echo start MineCase.Server...
  19. cd ../src/MineCase.Server
  20. dotnet run
  21. echo start MineCase.Gateway...
  22. cd ../src/MineCase.Gateway
  23. dotnet run