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

Add health check endpoint to Keystone's express server #6192

Merged
merged 12 commits into from
Jul 27, 2021

Conversation

JedWatson
Copy link
Member

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.

@JedWatson JedWatson requested review from timleslie and emmatown July 27, 2021 01:27
@vercel
Copy link

vercel bot commented Jul 27, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/6DLTA7EjJX3KLm7zmuMA5U27Rz7Z
✅ Preview: https://keystone-next-docs-git-add-health-check-keystonejs.vercel.app

@changeset-bot
Copy link

changeset-bot bot commented Jul 27, 2021

🦋 Changeset detected

Latest commit: 2f85233

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@keystone-next/keystone Patch
@keystone-next/types Patch

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 27, 2021

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.

@vercel vercel bot temporarily deployed to Preview July 27, 2021 01:33 Inactive
Copy link
Contributor

@timleslie timleslie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs changeset

packages/types/src/config/index.ts Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview July 27, 2021 01:35 Inactive
@JedWatson
Copy link
Member Author

@timleslie you got me while I was writing a changeset 😜

Done now, fixed the type too

@JedWatson JedWatson requested a review from timleslie July 27, 2021 01:36
@vercel vercel bot temporarily deployed to Preview July 27, 2021 01:42 Inactive
@vercel vercel bot temporarily deployed to Preview July 27, 2021 02:08 Inactive
@vercel vercel bot temporarily deployed to Preview July 27, 2021 02:31 Inactive
@vercel vercel bot temporarily deployed to Preview July 27, 2021 02:39 Inactive
@vercel vercel bot temporarily deployed to Preview July 27, 2021 02:41 Inactive
@vercel vercel bot temporarily deployed to Preview July 27, 2021 02:44 Inactive
Copy link
Contributor

@timleslie timleslie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@timleslie timleslie enabled auto-merge (squash) July 27, 2021 02:47
@timleslie timleslie merged commit 93f1e5d into master Jul 27, 2021
@timleslie timleslie deleted the add-health-check branch July 27, 2021 02:50
@gautamsi
Copy link
Member

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 configureExpress feature

Nikitoring pushed a commit to Nikitoring/keystone that referenced this pull request Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants