app/apps/backend/src/main.ts
Mathis d4a224614e
Add security and performance enhancements, remove unused code
Deleted unused spec files for app controller and service to clean up the codebase. Added helmet middleware for security and integrated ThrottlerModule for rate limiting and ConfigModule for configuration management. Updated app.service to modify response structure.
2024-09-02 14:58:28 +02:00

25 lines
601 B
TypeScript

/**
* This is not a production server yet!
* This is only a minimal backend to get started.
*/
import { Logger } from "@nestjs/common";
import { NestFactory } from "@nestjs/core";
import helmet from "helmet";
import { AppModule } from "./app/app.module";
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const globalPrefix = "api";
app.setGlobalPrefix(globalPrefix);
app.use(helmet());
const port = process.env.PORT || 3000;
await app.listen(port);
Logger.log(
`🚀 Application is running on: http://localhost:${port}/${globalPrefix}`,
);
}
bootstrap();