chore: linting

This commit is contained in:
zhom
2026-01-03 14:26:44 +04:00
parent fba0e1ca71
commit 7544c11197
80 changed files with 15102 additions and 169 deletions
+30
View File
@@ -0,0 +1,30 @@
import { NestFactory } from "@nestjs/core";
import { AppModule } from "./app.module.js";
function validateEnv() {
const required = ["SYNC_TOKEN"];
const missing = required.filter((key) => !process.env[key]);
if (missing.length > 0) {
console.error(
`Missing required environment variables: ${missing.join(", ")}`,
);
process.exit(1);
}
}
async function bootstrap() {
validateEnv();
const app = await NestFactory.create(AppModule);
app.enableCors({
origin: "*",
methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"],
allowedHeaders: ["Content-Type", "Authorization"],
});
const port = process.env.PORT ?? 3929;
await app.listen(port);
console.log(`Donut Sync service running on port ${port}`);
}
void bootstrap();