-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add health check endpoint to Keystone's express server #6192
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/6DLTA7EjJX3KLm7zmuMA5U27Rz7Z |
🦋 Changeset detectedLatest commit: 2f85233 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs changeset
@timleslie you got me while I was writing a changeset 😜 Done now, fixed the type too |
…tone into add-health-check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Not that you have added something for express server, I hope other express server needs will be re evalutated and open soon. One of the pressing one is bringing back |
This adds a configurable health check endpoint to Keystone's express server, avoiding the need to use a custom admin page to implement your own.
It will respond on
/_healthcheck
with JSON:{ status: 'pass', timestamp: Date.now() }
You can change the path and data with the
config.server.healthCheck
option (documentation to be added in a separate PR)This PR also adds a response to the dev server while Keystone is initialising, which strictly shouldn't be necessary since you shouldn't be using the dev server in production, but it seems prudent to cover this there anyway just in case.