mirror of
https://github.com/certd/certd.git
synced 2026-04-24 12:27:25 +08:00
chore: jwt key
This commit is contained in:
@@ -1 +1 @@
|
||||
CERTD_AUTH_JWT_KEYS=certd666
|
||||
CERTD_AUTH_JWT_KEY=certd666
|
||||
|
||||
@@ -5,11 +5,12 @@ import { MidwayConfig } from '@midwayjs/core';
|
||||
import { UserEntity } from '../modules/authority/entity/user';
|
||||
import { PipelineEntity } from '../modules/pipeline/entity/pipeline';
|
||||
import * as dotenv from 'dotenv';
|
||||
//import { logger } from '../utils/logger';
|
||||
// load .env file in process.cwd
|
||||
dotenv.config();
|
||||
export default {
|
||||
// use for cookie sign key, should change to your own and keep security
|
||||
keys: process.env.CERTD_AUTH_JWT_KEYS,
|
||||
keys: process.env.CERTD_AUTH_JWT_KEY,
|
||||
koa: {
|
||||
port: 7001,
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as validateComp from '@midwayjs/validate';
|
||||
import * as productionConfig from './config/config.production';
|
||||
import * as previewConfig from './config/config.preview';
|
||||
import * as defaultConfig from './config/config.default';
|
||||
import { Configuration, App } from '@midwayjs/decorator';
|
||||
import { App, Configuration } from '@midwayjs/decorator';
|
||||
import * as koa from '@midwayjs/koa';
|
||||
import * as orm from '@midwayjs/typeorm';
|
||||
import * as cache from '@midwayjs/cache';
|
||||
@@ -15,7 +15,6 @@ import { PreviewMiddleware } from './middleware/preview';
|
||||
import { AuthorityMiddleware } from './middleware/authority';
|
||||
import * as staticFile from '@midwayjs/static-file';
|
||||
import * as cron from './plugins/cron';
|
||||
import { logger } from './utils/logger';
|
||||
|
||||
@Configuration({
|
||||
imports: [koa, orm, cache, flyway, validateComp, cron, staticFile],
|
||||
@@ -46,12 +45,6 @@ export class ContainerLifeCycle {
|
||||
// bodyparser options see https://github.com/koajs/bodyparser
|
||||
//this.app.use(bodyParser());
|
||||
//请求日志打印
|
||||
|
||||
setTimeout(() => {
|
||||
console.log('heart beat ');
|
||||
logger.info('heart beat');
|
||||
}, 5000);
|
||||
|
||||
this.app.useMiddleware([
|
||||
ReportMiddleware,
|
||||
//统一异常处理
|
||||
|
||||
Reference in New Issue
Block a user