express.js 준비
This commit is contained in:
+6
-20
@@ -8,29 +8,15 @@ import path from 'node:path';
|
||||
import { LiteHashDRBG } from './util/LiteHashDRBG.js';
|
||||
import { simpleSerialize } from './util/simpleSerialize.js';
|
||||
import { SammoRootAPI } from './clientAPI/sammoRootAPI.js';
|
||||
|
||||
export async function test() {
|
||||
console.log("Hello World!");
|
||||
console.log(process.env.GAME_DB_HOST);
|
||||
|
||||
const abc= {
|
||||
a: 1,
|
||||
b: 2,
|
||||
c: 3,
|
||||
}
|
||||
const t2 = await validate(abc);
|
||||
console.log(t2);
|
||||
}
|
||||
|
||||
|
||||
await test();
|
||||
import { buildAPISystem } from './api/generator.js';
|
||||
import { sammoRootAPI } from './api/root.js';
|
||||
|
||||
const ownConfig = {
|
||||
sessionSecret: process.env.SESSION_SECRET,
|
||||
port: Number(process.env.SERVER_PORT),
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
AppDataSource.initialize().then(async () => {
|
||||
// create express app
|
||||
const app = express()
|
||||
@@ -40,9 +26,9 @@ AppDataSource.initialize().then(async () => {
|
||||
resave: false,
|
||||
saveUninitialized: false,
|
||||
}))
|
||||
app.set('etag', false);
|
||||
//app.set('etag', false);
|
||||
|
||||
//app.use('/', rootRouter);
|
||||
app.use('/rootAPI', buildAPISystem(sammoRootAPI));
|
||||
|
||||
// start express server
|
||||
app.listen(ownConfig.port)
|
||||
@@ -50,5 +36,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