[FEATURE} Adjust error handling and bump versions
This commit is contained in:
parent
d47a8c3cc4
commit
360dd32860
19 changed files with 1052 additions and 455 deletions
|
@ -7,6 +7,7 @@ import { INFO, OK, logInfo } from "./util/logging.js";
|
|||
// Import Core Modules
|
||||
import buildRoutes from "./server/router.js";
|
||||
import injectSockets from "./server/sockets.js";
|
||||
import pg from "./database/postgres.js";
|
||||
|
||||
// Constants
|
||||
const title = "MCL";
|
||||
|
@ -23,6 +24,7 @@ export default class Minecluster {
|
|||
logInfo(fig.textSync(title, "Larry 3D"));
|
||||
INFO("INIT", "Initializing...");
|
||||
this.app = express();
|
||||
this.pg = pg;
|
||||
this.server = http.createServer(this.app);
|
||||
this.sockets = injectSockets(this.server, this.jobs);
|
||||
this.routes = buildRoutes(this.sockets);
|
||||
|
@ -31,11 +33,12 @@ export default class Minecluster {
|
|||
}
|
||||
|
||||
async _connect() {
|
||||
// await this.pg.connect();
|
||||
await this.pg.connect();
|
||||
}
|
||||
|
||||
start() {
|
||||
const mcl = this;
|
||||
|
||||
return new Promise(async function init(res) {
|
||||
mcl._preinitialize();
|
||||
await mcl._connect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue