feat: enhance project structure with server and workflow management
- Introduced a new server package with Fastify for handling API requests and workflows. - Implemented user authentication and authorization with JWT and cookie management. - Added endpoints for managing workflows, runs, and user accounts. - Established a dashboard for monitoring workflow status and statistics. - Included a script sandbox for executing user-defined scripts securely. - Updated README with setup instructions and API documentation. - Configured database migrations for user management. - Enhanced logging capabilities for better traceability.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { DATA_DIR, SERVER_ROOT } from "./paths.js";
|
||||
|
||||
const dbPath = process.env.SCRUNNER_DB_PATH ?? path.resolve("data/scrunner.db");
|
||||
const dbPath = process.env.SCRUNNER_DB_PATH ?? path.join(DATA_DIR, "scrunner.db");
|
||||
fs.mkdirSync(path.dirname(dbPath), { recursive: true });
|
||||
|
||||
/** @type {import("knex").Knex.Config} */
|
||||
@@ -12,7 +13,7 @@ const config = {
|
||||
},
|
||||
useNullAsDefault: true,
|
||||
migrations: {
|
||||
directory: "./migrations",
|
||||
directory: path.join(SERVER_ROOT, "migrations"),
|
||||
extension: "js",
|
||||
loadExtensions: [".js"],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user