express-post-task-scheduler
Version:
A lightweight npm package to create and manage scheduled tasks using Express middleware. Configure tasks via POST requests and execute them at specified times seamlessly.
16 lines (15 loc) • 676 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const settings_1 = require("../src/settings");
function init() {
const dbPath = path_1.default.join(settings_1.SETTINGS.basePath, "prisma", "tasks.db");
const distPath = path_1.default.join(settings_1.SETTINGS.basePath, "dist");
fs_1.default.rmSync(dbPath, { force: true });
fs_1.default.rmSync(distPath, { force: true, recursive: true });
}
init();