fix: yargs

This commit is contained in:
Innei
2021-09-08 15:10:31 +08:00
parent 63ce0dc990
commit 03e95fea25
5 changed files with 9 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
import argv from 'argv'
import type { AxiosRequestConfig } from 'axios'
import { argv } from 'yargs'
import { isDev } from './utils/index.util'
export const CROSS_DOMAIN = {
allowedOrigins: [

View File

@@ -10,8 +10,10 @@ import { AppModule } from './app.module'
import { fastifyApp } from './common/adapt/fastify'
import { SpiderGuard } from './common/guard/spider.guard'
import { LoggingInterceptor } from './common/interceptors/logging.interceptor'
import argv from 'argv'
const PORT = argv.port || 2333
import { argv } from 'yargs'
const PORT: number = +argv.port || 2333
const APIVersion = 1
const Origin = CROSS_DOMAIN.allowedOrigins

View File

@@ -7,7 +7,7 @@ import { AuthController } from './auth.controller'
import { AuthService } from './auth.service'
import { JwtStrategy } from './jwt.strategy'
export const __secret =
export const __secret: any =
SECURITY.jwtSecret || process.env.SECRET || 'asjhczxiucipoiopiqm2376'
const jwtModule = JwtModule.registerAsync({