@cocalc/hub
Version:
CoCalc: Backend webserver component
17 lines • 654 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.database = void 0;
const database_1 = require("@cocalc/database");
// IMPORTANT: For typescript we make the default export have type PostgreSQL.
// In reality the default could be undefined until init gets called.
// We thus assume for convenience that init gets called before this default
// object gets used.
exports.database = undefined;
function init(opts) {
if (exports.database != null) {
throw Error("only call database init once");
}
exports.database = (0, database_1.db)(opts);
}
exports.default = init;
//# sourceMappingURL=database.js.map