Added Health Endpoint
This commit is contained in:
@@ -44,9 +44,7 @@ async function main() {
|
|||||||
await initMailer();
|
await initMailer();
|
||||||
await initS3();
|
await initS3();
|
||||||
|
|
||||||
app.get('/health', async (req, res) => {
|
|
||||||
return res.send({ status: 'ok' })
|
|
||||||
})
|
|
||||||
|
|
||||||
/*app.addHook("onRequest", (req, reply, done) => {
|
/*app.addHook("onRequest", (req, reply, done) => {
|
||||||
console.log("Incoming:", req.method, req.url, "Headers:", req.headers)
|
console.log("Incoming:", req.method, req.url, "Headers:", req.headers)
|
||||||
@@ -66,6 +64,10 @@ async function main() {
|
|||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
app.get('/health', async (req, res) => {
|
||||||
|
return res.send({ status: 'ok' })
|
||||||
|
})
|
||||||
|
|
||||||
//Plugin nur auf bestimmten Routes
|
//Plugin nur auf bestimmten Routes
|
||||||
await app.register(queryConfigPlugin, {
|
await app.register(queryConfigPlugin, {
|
||||||
routes: ['/api/resource/:resource/paginated']
|
routes: ['/api/resource/:resource/paginated']
|
||||||
|
|||||||
Reference in New Issue
Block a user