生成密码

main
expressgy 3 months ago
parent ad853c326e
commit 8b6db376f3
  1. 1
      package.json
  2. 8
      src/main.ts
  3. 19
      test/getDafaultPass.js

@ -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",

@ -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<NestFastifyApplication>(
AppModule,

@ -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);
Loading…
Cancel
Save