snowballtools-base/packages/backend/test/delete-db.ts
nabarun 42bdd21089
All checks were successful
Lint / lint (20.x) (push) Successful in 4m12s
Upgrade from laconic-sdk to registry-sdk (#1)
Part of [Service provider auctions for web deployments](https://www.notion.so/Service-provider-auctions-for-web-deployments-104a6b22d47280dbad51d28aa3a91d75)

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Co-authored-by: Adw8 <adwaitgharpure@gmail.com>
Reviewed-on: #1
2024-10-16 08:43:51 +00:00

20 lines
420 B
TypeScript

import * as fs from 'fs/promises';
import debug from 'debug';
import { getConfig } from '../src/utils';
const log = debug('snowball:delete-database');
const deleteFile = async (filePath: string) => {
await fs.unlink(filePath);
log(`File ${filePath} has been deleted.`);
};
const main = async () => {
const config = await getConfig();
deleteFile(config.database.dbPath);
};
main().catch((err) => log(err));