forked from wangziqi/gongxue-base
feat: add crm webhook worker
This commit is contained in:
11
apps/worker/src/db.ts
Normal file
11
apps/worker/src/db.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { createPool } from '../../../packages/db/src/index.js';
|
||||
import { config } from './config.js';
|
||||
|
||||
export const pool = createPool({
|
||||
connectionString: config.databaseUrl,
|
||||
max: 5,
|
||||
});
|
||||
|
||||
export async function closePool() {
|
||||
await pool.end();
|
||||
}
|
||||
Reference in New Issue
Block a user