mirror of
https://github.com/vernu/textbee.git
synced 2026-05-19 05:46:23 -04:00
fix(api): fix build issues
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||
"start:dev": "nest start --watch",
|
||||
"start:debug": "nest start --debug --watch",
|
||||
"start": "node dist/src/main",
|
||||
"start": "node dist/main.js",
|
||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dotenv/config'
|
||||
import * as crypto from 'crypto'
|
||||
import { VersioningType, Logger } from '@nestjs/common'
|
||||
import { NestFactory } from '@nestjs/core'
|
||||
import { AppModule } from './app.module'
|
||||
@@ -7,6 +8,11 @@ import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
|
||||
import * as express from 'express'
|
||||
import { NestExpressApplication } from '@nestjs/platform-express'
|
||||
|
||||
// Ensure crypto is available globally for @nestjs/schedule
|
||||
if (typeof globalThis.crypto === 'undefined') {
|
||||
globalThis.crypto = crypto as any
|
||||
}
|
||||
|
||||
// Global error handlers to prevent server crashes
|
||||
const logger = new Logger('GlobalErrorHandler')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user