File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,14 @@ import { LogsService } from './common/logging/logs.service';
1111
1212async function bootstrap ( ) {
1313 const app = await NestFactory . create < NestExpressApplication > ( AppModule ) ;
14- app . enableCors ( { origin : '*' , credentials : true } ) ;
14+ app . enableCors ( {
15+ origin : [
16+ 'http://localhost:3000' ,
17+ / \. p r e v i e w \. c o d e s i g n a l \. d e v $ / , // allow any Codesignal preview frontend
18+ ] ,
19+ credentials : true ,
20+ } ) ;
21+
1522 app . useGlobalPipes (
1623 new ValidationPipe ( {
1724 transform : true ,
@@ -35,7 +42,8 @@ async function bootstrap() {
3542 res . sendFile ( join ( publicDir , 'index.html' ) ) ,
3643 ) ;
3744
38- const port = Number ( process . env . PORT ) || 3000 ;
45+ const port = Number ( process . env . PORT ) || 3001 ;
46+
3947 await app . listen ( port ) ;
4048 console . log ( `Application is running on: http://localhost:${ port } ` ) ;
4149}
You can’t perform that action at this time.
0 commit comments