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
|
@ -15,7 +15,7 @@
|
||||
"scripts": {
|
||||
"dev": "dotenv -e ../../apps/builder/.env.local yarn prisma db push && yarn start:sutdio ",
|
||||
"start:sutdio": "dotenv -e ../../apps/builder/.env.local -v BROWSER=none yarn prisma studio",
|
||||
"build": "yarn migration:deploy",
|
||||
"build": "DATABASE_URL=$MIGRATION_DATABASE_URL yarn migration:deploy",
|
||||
"migration:push": "dotenv -e ../../apps/builder/.env.local yarn prisma db push",
|
||||
"migration:create": "dotenv -e ../../apps/builder/.env.local yarn prisma migrate dev",
|
||||
"migration:reset": "dotenv -e ../../apps/builder/.env.local yarn prisma migrate reset",
|
||||
|
Reference in New Issue
Block a user