[FEATURE] Basic System with file manager (#4)
Co-authored-by: dunemask <dunemask@gmail.com> Co-authored-by: Dunemask <dunemask@gmail.com> Reviewed-on: https://gitea.dunemask.dev/elysium/minecluster/pulls/4
This commit is contained in:
parent
8fb5b34c77
commit
4f19cf19d9
62 changed files with 5910 additions and 1190 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