Started documenting code

This commit is contained in:
Kevin FEDYNA
2025-01-22 00:54:43 +01:00
parent 54f4a83590
commit 3ce1273455
9 changed files with 72 additions and 24 deletions
+9 -1
View File
@@ -1,6 +1,14 @@
import { Database } from "@db/sqlite";
export default async function ensureDatabases() {
/**
* Ensure database file creation on new server start.
*
* Read all SQL files in init directory and create
* associated SQLite database file.
*
* **Must not be used out of statup use-case.**
*/
export default async function ensureDatabases(): Promise<void> {
await Deno.mkdir("databases/data", { recursive: true });
for await (const file of Deno.readDir("databases/init")) {