UNPKG

axiodb

Version:

A blazing-fast, lightweight, and scalable nodejs package based DBMS for modern application. Supports schemas, encryption, and advanced query capabilities.

49 lines 1.57 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.AvailableRoutes = exports.staticPath = exports.CORS_CONFIG = exports.ServerKeys = void 0; const path_1 = __importDefault(require("path")); var ServerKeys; (function (ServerKeys) { ServerKeys[ServerKeys["PORT"] = 27018] = "PORT"; ServerKeys["LOCALHOST"] = "127.0.1"; })(ServerKeys || (exports.ServerKeys = ServerKeys = {})); // Config for CORS exports.CORS_CONFIG = { ORIGIN: "*", METHODS: ["GET", "HEAD", "PUT", "PATCH", "POST", "DELETE"], ALLOWED_HEADERS: ["Content-Type", "Authorization"], EXPOSED_HEADERS: ["Content-Length", "X-Requested-With"], MAX_AGE: 86400, // 24 hours in seconds ALLOW_CREDENTIALS: true, }; exports.staticPath = path_1.default.resolve(__dirname, "../public/AxioControl"); // Routes exports.AvailableRoutes = [ { method: "GET", path: "/health", description: "Health check endpoint to verify server status", }, { method: "GET", path: "/routes", description: "List all available API routes", }, { method: "GET", path: "/api/databases", description: "Get a list of all databases", }, { method: "POST", path: "/api/create-database", description: "Create a new database", payload: { name: "string", }, }, ]; //# sourceMappingURL=keys.js.map