build: Prevent DB connection during building
This commit is contained in:
parent
e938e7e064
commit
9b0843405a
@ -4,7 +4,7 @@
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
"build": "BUILDING='true' vite build",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"checkformat": "prettier --check .",
|
||||
|
@ -118,7 +118,10 @@ class Db {
|
||||
}
|
||||
|
||||
const db = new Db();
|
||||
|
||||
if (process.env.BUILDING !== 'true') {
|
||||
await db.init();
|
||||
await db.createChannel('general');
|
||||
}
|
||||
|
||||
export { db, type Messages };
|
||||
|
Loading…
Reference in New Issue
Block a user