fix
This commit is contained in:
+23
-4
@@ -3,13 +3,15 @@ import 'reflect-metadata';
|
||||
import { BasicQueryDTO } from './api/index.js';
|
||||
import { validate } from 'class-validator';
|
||||
import express, { type Request, type Response } from "express"
|
||||
import { AppDataSource } from "./data_source"
|
||||
import dotenv from "dotenv";
|
||||
import { AppDataSource } from "./data_source.js"
|
||||
import session from "express-session";
|
||||
import path from 'node:path';
|
||||
import { LiteHashDRBG } from './util/LiteHashDRBG.js';
|
||||
import { simpleSerialize } from './util/simpleSerialize.js';
|
||||
|
||||
export async function test() {
|
||||
console.log("Hello World!");
|
||||
console.log(process.env.GAME_DB_HOST);
|
||||
|
||||
const dto = new BasicQueryDTO();
|
||||
dto.command = 'None';
|
||||
@@ -18,6 +20,23 @@ export async function test() {
|
||||
const result = await validate(dto);
|
||||
console.log(result);
|
||||
//must be integer가 나타나야함
|
||||
|
||||
const rawRng = new LiteHashDRBG(simpleSerialize(
|
||||
'haha',
|
||||
'hoho'
|
||||
));
|
||||
|
||||
const arr: Promise<Uint8Array>[] = [];
|
||||
let j = 0;
|
||||
for(let i = 0; i < 100; i += 1){
|
||||
arr.push(rawRng.nextBits(32).then((v) => {
|
||||
console.log(`${j}: ${i}`);
|
||||
j += 1;
|
||||
return v;
|
||||
}));
|
||||
}
|
||||
|
||||
await Promise.all(arr);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +47,8 @@ const ownConfig = {
|
||||
port: Number(process.env.SERVER_PORT),
|
||||
}
|
||||
|
||||
/*
|
||||
AppDataSource.initialize().then(async () => {
|
||||
|
||||
// create express app
|
||||
const app = express()
|
||||
app.use(session({
|
||||
@@ -47,5 +66,5 @@ AppDataSource.initialize().then(async () => {
|
||||
console.log(`Express server has started on port ${ownConfig.port}`)
|
||||
|
||||
}).catch(error => console.log(error))
|
||||
|
||||
*/
|
||||
export default {};
|
||||
Reference in New Issue
Block a user