Skip to content

Commit

Permalink
🚮 Ditch mongo, add Redis
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdodo committed Dec 18, 2024
1 parent 030efbe commit f431f72
Show file tree
Hide file tree
Showing 39 changed files with 330 additions and 1,449 deletions.
56 changes: 0 additions & 56 deletions back/entities/game.ts

This file was deleted.

17 changes: 0 additions & 17 deletions back/entities/pool.ts

This file was deleted.

22 changes: 0 additions & 22 deletions back/entities/queuer.ts

This file was deleted.

11 changes: 4 additions & 7 deletions back/main.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import { initMikro } from "./utils/init-mikro.js";
import { initMongo } from "./utils/init-mongo.js";
import type { Db } from "mongodb";
import type { MikroORM } from "@mikro-orm/core";
import { createBackContext } from "./utils/create-back-context.js";
import { startServer } from "core/utils/start-server.js";
import { createRedisClient } from "./utils/create-redis-client.js";
import { createDataMapper } from "./utils/create-data-mapper.js";

console.log("Server is starting...");

Promise.resolve()
.then(async () => {
const db: Db = await initMongo();
const orm: MikroORM = await initMikro();
const backContext = await createBackContext(orm, db);
const redis = await createRedisClient();
const backContext = await createBackContext(redis);
startServer(backContext);
console.log("\n╭───────────────────╮");
console.log("│ Autochess Backend |");
Expand Down
Loading

0 comments on commit f431f72

Please sign in to comment.