Fix #13, make youtube API optional

This commit is contained in:
2023-04-11 18:39:02 +02:00
parent 4fbd9a260f
commit d716b3882b
5 changed files with 24 additions and 3 deletions

View File

@ -1,11 +1,12 @@
import { env } from '$env/dynamic/private';
import type { Account, Post, Tag } from '$lib/mastodon/response';
import { isTruthy } from '$lib/truthyString';
import sqlite3 from 'sqlite3';
const { DEV } = import.meta.env;
const db: sqlite3.Database = new sqlite3.Database('moshingmammut.db');
if (DEV && env.VERBOSE === 'true') {
if (DEV && isTruthy(env.VERBOSE)) {
sqlite3.verbose();
db.on('change', (t, d, table, rowid) => {
console.debug('DB change event', t, d, table, rowid);