diff --git a/package.json b/package.json index 3819e36..140cded 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "start": "nest start", "start:dev": "nest start --watch", + "dev": "nest start --watch", "start:debug": "nest start --debug --watch", "start:prod": "node dist/main", "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", diff --git a/src/main.ts b/src/main.ts index 25df14b..838fb8e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -25,6 +25,14 @@ import { ValidationPipe } from '@nestjs/common'; import { FormatResponseInterceptor } from '@common/interceptor/format-response/format-response.interceptor'; import { HttpExceptFilter } from '@common/http-except/http-except.filter'; +// +// import config from '@config/configuration'; +// import cryptoPassword from '@/utils/cryptoPassword'; +// +// const pass = cryptoPassword(config().system.defaultPassword, config().system.passwordSalt); +// +// console.log(pass); + async function bootstrap() { const app = await NestFactory.create( AppModule, diff --git a/test/getDafaultPass.js b/test/getDafaultPass.js new file mode 100644 index 0000000..09c37dd --- /dev/null +++ b/test/getDafaultPass.js @@ -0,0 +1,19 @@ +// | ------------------------------------------------------------ +// | @版本: version 0.1 +// | @创建人: 【Nie-x7129】 +// | @E-mail: x71291@outlook.com +// | @所在项目: pac-auth +// | @文件描述: getDafaultPass.js - +// | @创建时间: 2024-07-01 10:21 +// | @更新时间: 2024-07-01 10:21 +// | @修改记录: +// | -*-*-*- (时间--修改人--修改说明) -*-*-*- +// | = +// | ------------------------------------------------------------ + +import config from '../src/config/configuration'; +import cryptoPassword from '../src/utils/cryptoPassword'; + +const pass = cryptoPassword(config().system.defaultPassword, config().system.passwordSalt); + +console.log(pass);