- 서버 호스트 0.0.0.0 설정
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
HOST=0.0.0.0
|
||||
PORT=3000
|
||||
|
||||
# PostgreSQL 설정
|
||||
|
||||
@@ -17,7 +17,7 @@ async function bootstrap() {
|
||||
if (!origin) return callback(null, true);
|
||||
|
||||
// 특정 도메인만 막고 싶은 경우 whitelist 가능
|
||||
const whitelist = ["http://localhost:5173", "https://scheduler.bkdhome.p-e.kr"];
|
||||
const whitelist = ["http://localhost:5173", "http://192.168.219.105:5185", "https://scheduler.bkdhome.p-e.kr"];
|
||||
if (whitelist.includes(origin)) {
|
||||
return callback(null, true);
|
||||
}
|
||||
@@ -30,7 +30,7 @@ async function bootstrap() {
|
||||
|
||||
app.enableShutdownHooks();
|
||||
app.useGlobalFilters(new AllExceptionsFilter());
|
||||
await app.listen(process.env.PORT ?? 3000, () => { process.env.NODE_ENV !== 'prod' && console.log(`servier is running on ${process.env.PORT}`) });
|
||||
await app.listen(process.env.PORT ?? 3000, '0.0.0.0', () => { process.env.NODE_ENV !== 'prod' && console.log(`servier is running on ${process.env.PORT}`) });
|
||||
|
||||
}
|
||||
bootstrap();
|
||||
|
||||
Reference in New Issue
Block a user