You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Name / Title: Fix Backend main.ts Bootstrap and CORS Configuration
Complexity: Low
Task Type: Backend / Bug
Description: The NestJS application currently has critical bugs in its entry file (src/main.ts) that prevent it from compiling and communicating with the frontend. AppModule is used in NestFactory.create() but never imported. Furthermore, Cross-Origin Resource Sharing (CORS) is not enabled, which will block all API requests from the Next.js frontend during local development and in production.
Technical Requirement: NestJS, TypeScript
Estimated time to deliver: 1 hour
Acceptance criteria:
src/main.ts compiles successfully without missing import errors.
CORS is explicitly enabled in main.ts with appropriate origins configured (or open for local dev).
MUST DOs:
Add import { AppModule } from './app.module'; to main.ts.
Add app.enableCors() with credentials support if using cookies for JWT, or standard headers if using Authorization headers.
Fix Backend Bootstrap and Architecture Issues
main.tsBootstrap and CORS Configurationsrc/main.ts) that prevent it from compiling and communicating with the frontend.AppModuleis used inNestFactory.create()but never imported. Furthermore, Cross-Origin Resource Sharing (CORS) is not enabled, which will block all API requests from the Next.js frontend during local development and in production.src/main.tscompiles successfully without missing import errors.main.tswith appropriate origins configured (or open for local dev).import { AppModule } from './app.module';tomain.ts.app.enableCors()with credentials support if using cookies for JWT, or standard headers if using Authorization headers.skillcert-backend-serversrc/main.ts