main.cpp 518 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include <iostream>
  3. #include "core/entry.h"
  4. #include <filesystem>
  5. int main()
  6. {
  7. std::string config_filepath = std::filesystem::current_path().string()+"/config.ini";
  8. if (fastweb_start(config_filepath.c_str()) != 0)
  9. return -1;
  10. while (true)
  11. {
  12. std::string input;
  13. std::cin >> input;
  14. if (input == "quit" || input == "exit")
  15. {
  16. fastweb_close();
  17. std::cout << "closed";
  18. break;
  19. }
  20. else
  21. std::cout << "Enter \"quit\" or \"exit\" to exit the application" << std::endl;
  22. }
  23. return 0;
  24. }