mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-18 14:04:23 +01:00
fmt
This commit is contained in:
@@ -2,8 +2,8 @@ import { DittoDB } from '@/db/DittoDB.ts';
|
|||||||
import { delay } from '@/test.ts';
|
import { delay } from '@/test.ts';
|
||||||
|
|
||||||
if (Deno.env.get('CI') && Deno.env.get('DATABASE_URL')?.startsWith('postgres')) {
|
if (Deno.env.get('CI') && Deno.env.get('DATABASE_URL')?.startsWith('postgres')) {
|
||||||
console.info('Waiting 15 seconds for postgres to start...');
|
console.info('Waiting 15 seconds for postgres to start...');
|
||||||
await delay(15000);
|
await delay(15000);
|
||||||
}
|
}
|
||||||
|
|
||||||
const kysely = await DittoDB.getInstance();
|
const kysely = await DittoDB.getInstance();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Kysely } from 'kysely';
|
import { Kysely } from 'kysely';
|
||||||
import { PostgresJSDialect } from "kysely-postgres-js";
|
import { PostgresJSDialect } from 'kysely-postgres-js';
|
||||||
import postgres from 'postgres';
|
import postgres from 'postgres';
|
||||||
|
|
||||||
import { Conf } from '@/config.ts';
|
import { Conf } from '@/config.ts';
|
||||||
@@ -14,9 +14,9 @@ export class DittoPostgres {
|
|||||||
if (!this.db) {
|
if (!this.db) {
|
||||||
this.db = new Kysely({
|
this.db = new Kysely({
|
||||||
dialect: new PostgresJSDialect({
|
dialect: new PostgresJSDialect({
|
||||||
postgres: postgres(Conf.databaseUrl) as any
|
postgres: postgres(Conf.databaseUrl) as any,
|
||||||
}),
|
}),
|
||||||
log: KyselyLogger
|
log: KyselyLogger,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user