smc-hub
Version:
CoCalc: Backend webserver component
17 lines • 642 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.database = void 0;
var postgres_1 = require("../postgres");
// 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 = postgres_1.db(opts);
}
exports.default = init;
//# sourceMappingURL=database.js.map