Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform server health check after Cody hook #32

Open
codeliner opened this issue Jul 4, 2023 · 0 comments
Open

Perform server health check after Cody hook #32

codeliner opened this issue Jul 4, 2023 · 0 comments
Labels
enhancement New feature or request infrastructure
Milestone

Comments

@codeliner
Copy link
Contributor

npm run serve uses Nx to start backend, frontend and cody servers within one go. Unfortunately, the watch mode of backend and frontend servers do not work reliable all the time.

Sometimes a TS error occurs, because the user on prooph board did not trigger Cody with all needed information (which is a totally valid use case). As soon as information is complete, the servers should restart automatically and continue to serve the app. We cannot rely on the watch mode alone, because it does not always recover from compile time errors.

Instead we need to start all servers through our own "serve" script so that we have control over the child processes of the servers.
It should be possible to trigger a restart of the servers with a helper function that can be used from a Cody Hook.

Then we can do a health check at the end of each Cody Hook and if it fails, let the script restart the servers to see if it solves the issue.

The backend server provides a health check endpoint: http://localhost:4100/health
And frontend could be checked by requesting http://localhost:4200/dashboard and see if a status code 200 is returned along with a non empty body

@codeliner codeliner added enhancement New feature or request infrastructure labels Jul 4, 2023
@codeliner codeliner added this to the Phase#1 milestone Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request infrastructure
Projects
Development

No branches or pull requests

1 participant