move folder check

This commit is contained in:
Cogent Apps
2023-03-15 20:13:44 +00:00
parent 5f5f48d42e
commit 42e2973627
3 changed files with 12 additions and 6 deletions

View File

@@ -1,8 +1,13 @@
import fs from 'fs';
import { verbose } from "sqlite3";
import ObjectStore from "./index";
const sqlite3 = verbose();
if (!fs.existsSync('./data')) {
fs.mkdirSync('./data');
}
const db = new sqlite3.Database('./data/object-store.sqlite');
export interface StoredObject {