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.
10 lines (9 loc) • 541 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const child_process_1 = require("child_process");
const path_1 = __importDefault(require("path"));
const schemaPath = path_1.default.resolve(path_1.default.join(path_1.default.dirname(path_1.default.dirname(__dirname)), "prisma", "schema.prisma"));
(0, child_process_1.execSync)(`npx prisma db push --schema ${schemaPath}`);