ci: 👷 Add connection pooling DB
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
import Mailgun from 'mailgun.js'
|
||||
import formData from 'form-data'
|
||||
|
||||
export const initMailgun = () => {
|
||||
const mailgun = new Mailgun(formData)
|
||||
return mailgun.client({
|
||||
username: 'api',
|
||||
key: '0b024a6aac02d3f52d30999674bcde30-53c13666-e8653f58',
|
||||
url: 'https://api.eu.mailgun.net',
|
||||
})
|
||||
}
|
||||
13
apps/viewer/pages/api/ping.ts
Normal file
13
apps/viewer/pages/api/ping.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next'
|
||||
import Cors from 'cors'
|
||||
import { initMiddleware, methodNotAllowed } from 'utils'
|
||||
|
||||
const cors = initMiddleware(Cors())
|
||||
|
||||
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
await cors(req, res)
|
||||
if (req.method === 'GET') return res.status(200).send({ message: 'success' })
|
||||
return methodNotAllowed(res)
|
||||
}
|
||||
|
||||
export default handler
|
||||
Reference in New Issue
Block a user