execution-flow.txt 911 B

1234567891011121314151617181920212223242526272829
  1. [Init]
  2. - Parse Jokes (make sure the format is correct) + load to memory
  3. - Initialize Black- and Whitelists
  4. - Initialize Documentation Page
  5. - Start Daemon
  6. - Start HTTP server
  7. [On HTTP Request]
  8. > IF IP is rate limited
  9. - return 429 error
  10. > ELSE IF IP is on blacklist
  11. - return 403 error
  12. > ELSE
  13. > IF path matches a script in ./endpoints
  14. - execute that script
  15. > ELSE IF path == ./
  16. > IF browser supports encoding
  17. - serve documentation with encoding according to encoding priority
  18. > ELSE
  19. - serve documentation without encoding
  20. > ELSE
  21. - return 404 error
  22. [On Init + Daemon Interval]
  23. > IF documentation file(s) changed
  24. - inject variables into documentation files
  25. - encode all files with Gzip, Deflate and Brotli encoding
  26. > ELSE
  27. - return