完成 MysqlConnection、RedisConnection
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user