| 13 | from .port_kill_adapter import killfrontendandbackendports, killbackendport, killfrontendport |
| 14 | |
| 15 | def show_help(): |
| 16 | print(""" |
| 17 | Botasaurus Server CLI |
| 18 | |
| 19 | Options: |
| 20 | --help Show this message and exit. |
| 21 | |
| 22 | Commands: |
| 23 | (no arguments) Runs both the backend and frontend services. |
| 24 | backend Runs only the backend api service. |
| 25 | install Installs the frontend service. |
| 26 | dev Run the backend normally, and the frontend in development mode with hot reloading, allowing you to see UI changes immediately as you update the Next.js frontend code in the "frontend/src" folder. This functionality is mostly not needed and is only useful when you need to change frontend ui's appearance. |
| 27 | """) |
| 28 | |
| 29 | def is_server_ready(url): |
| 30 | """Checks if the server at the given URL is reachable using a HEAD request. |