forked from bytebase/dbhub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
21 lines (18 loc) · 937 Bytes
/
Copy pathindex.ts
File metadata and controls
21 lines (18 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env node
import { main } from "./server.js";
import { loadConnectors } from "./utils/module-loader.js";
// Each load function uses a string literal so the bundler can resolve it.
const connectorModules = [
{ load: () => import("./connectors/postgres/index.js"), name: "PostgreSQL", driver: "pg" },
{ load: () => import("./connectors/sqlserver/index.js"), name: "SQL Server", driver: "mssql" },
{ load: () => import("./connectors/sqlite/index.js"), name: "SQLite", driver: "node:sqlite" },
{ load: () => import("./connectors/mysql/index.js"), name: "MySQL", driver: "mysql2" },
{ load: () => import("./connectors/mariadb/index.js"), name: "MariaDB", driver: "mariadb" },
{ load: () => import("./connectors/oracle/index.js"), name: "Oracle", driver: "oracledb" },
];
loadConnectors(connectorModules)
.then(() => main())
.catch((error) => {
console.error("Fatal error:", error);
process.exit(1);
});