Skip to content

Commit

Permalink
fix: yargs
Browse files Browse the repository at this point in the history
  • Loading branch information
Innei committed Sep 8, 2021
1 parent 63ce0dc commit 03e95fe
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@
"@typegoose/auto-increment": "^0.9.0",
"@typegoose/typegoose": "8.2.0",
"apollo-server-fastify": "^3.3.0",
"argv": "^0.0.2",
"axios": "*",
"bcrypt": "^5.0.1",
"cache-manager": "3.4.4",
"cache-manager-ioredis": "^2.1.0",
"yargs": "*",
"chalk": "*",
"class-transformer": "^0.4.0",
"class-validator": "^0.13.1",
Expand Down
17 changes: 2 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app.config.ts
Original file line number Diff line number Diff line change
@@ -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: [
Expand Down
6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/modules/auth/auth.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 03e95fe

Please sign in to comment.