完成 MysqlConnection、RedisConnection

This commit is contained in:
tone
2024-09-25 02:02:12 +08:00
parent 96d212a973
commit 64ab40e566
5 changed files with 147 additions and 1 deletions

View File

@@ -1,12 +1,18 @@
import { APILoader } from "@lib/API/APILoader";
import Logger from '@lib/Logger/Logger'
import config from "./config";
import MySQLConnection from "@lib/Database/MySQLConnection";
import RedisConnection from "@lib/Database/RedisConnection";
MySQLConnection
RedisConnection
// import API
import GetTest from "./api/GetTest";
const logger = new Logger('Server')
async function main(): Promise<void> {
logger.info('Starting...');
const apiLoader = new APILoader(config.cors);
// loadAPI
// addAPI
apiLoader.add(GetTest);
await apiLoader.start(config.API_Port);