Skip to content

Commit

Permalink
test: 테스트용 커밋
Browse files Browse the repository at this point in the history
  • Loading branch information
juyeong-s committed Oct 19, 2024
1 parent cfff428 commit 2b5dc09
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
17 changes: 11 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ export const CONFIG_URL = `${process.env.SCHEME}://${process.env.ESC_CONFIG}${pr
export const API_URL = `https://${process.env.ESC_API}${process.env.ESC_API_PORT}`;

export async function bootstrap() {
const result = await fetch(`${CONFIG_URL}/meeting/default`).then((result) =>
result.json(),
);
const sourceElement =
result.propertySources[0].source['cors-list'].split(', ');
// const result = await fetch(`${CONFIG_URL}/meeting/default`).then((result) =>
// result.json(),
// );
// const sourceElement =
// result.propertySources[0].source['cors-list'].split(', ');
// console.log({ sourceElement });
const app = await NestFactory.create(AppModule, {
cors: {
origin: [...sourceElement, 'http://localhost:3001'],
origin: [
'https://www.meething.net',
'http://localhost:3000',
'http://localhost:3001',
],
methods: '*',
credentials: true,
},
Expand Down
13 changes: 7 additions & 6 deletions src/room/room.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ export class RoomGateway
}

async afterInit(server: any) {
const result = await fetch(
`${CONFIG_URL}/meeting/${process.env.PROFILE}`,
).then((result) => result.json());
const username =
result.propertySources[1].source['spring.security.user.name'];
// const result = await fetch(
// `${CONFIG_URL}/meeting/${process.env.PROFILE}`,
// ).then((result) => result.json());
const username = 'admin';
// result.propertySources[1].source['spring.security.user.name'];
const password = await bcrypt.hash(
result.propertySources[1].source['spring.security.user.password'],
'jsween5723!!',
// result.propertySources[1].source['spring.security.user.password'],
await bcrypt.genSalt(),
);
instrument(this.io.server, {
Expand Down

0 comments on commit 2b5dc09

Please sign in to comment.