nabarun
42bdd21089
All checks were successful
Lint / lint (20.x) (push) Successful in 4m12s
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
20 lines
420 B
TypeScript
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));
|