Add health checks to content-fetch

This commit is contained in:
Jackson Harper
2024-02-12 14:42:51 +08:00
parent e0ce598be5
commit 856a7bc5ef

View File

@ -11,6 +11,8 @@ if (!process.env.VERIFICATION_TOKEN) {
throw new Error('VERIFICATION_TOKEN environment variable is not set')
}
app.get('/_ah/health', (req, res) => res.sendStatus(200))
app.all('/', (req, res, next) => {
if (req.method !== 'GET' && req.method !== 'POST') {
console.error('request method is not GET or POST')