fix: argv import
This commit is contained in:
@@ -3,13 +3,13 @@ import { NestFactory } from '@nestjs/core'
|
||||
import { NestFastifyApplication } from '@nestjs/platform-fastify'
|
||||
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
|
||||
import { performance } from 'perf_hooks'
|
||||
import { argv } from 'yargs'
|
||||
import { API_VERSION, CROSS_DOMAIN } from './app.config'
|
||||
import { AppModule } from './app.module'
|
||||
import { fastifyApp } from './common/adapters/fastify.adapter'
|
||||
import { SpiderGuard } from './common/guard/spider.guard'
|
||||
import { LoggingInterceptor } from './common/interceptors/logging.interceptor'
|
||||
import { MyLogger } from './processors/logger/logger.service'
|
||||
const { argv } = require('yargs')
|
||||
|
||||
const PORT: number = +argv.port || 2333
|
||||
|
||||
|
||||
6
src/global.d.ts
vendored
6
src/global.d.ts
vendored
@@ -1,6 +0,0 @@
|
||||
declare module 'yargs' {
|
||||
interface argv {
|
||||
$0: string
|
||||
[key: string]: any
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import consola_, { FancyReporter, LogLevel } from 'consola'
|
||||
import { argv } from 'yargs'
|
||||
import { isDev } from './index.util'
|
||||
const { argv } = require('yargs')
|
||||
class DateTimeReporter extends FancyReporter {
|
||||
formatDate(date: Date) {
|
||||
return date.toLocaleString(undefined, {
|
||||
|
||||
Reference in New Issue
Block a user