feat: add load types
This commit is contained in:
@@ -5,13 +5,14 @@ import { redisPublisher, redisSubscriber, redis } from './modules/redis.ts';
|
||||
import { neode, getSession } from './modules/neo4j.ts';
|
||||
import { minioClient } from './modules/minio.ts';
|
||||
import { sequelize } from './modules/sequelize.ts';
|
||||
|
||||
useConfig();
|
||||
export const emit = (channel: string, message?: any) => {
|
||||
redisPublisher.publish(channel, JSON.stringify(message));
|
||||
};
|
||||
export { neode, getSession, redis, minioClient, sequelize };
|
||||
|
||||
export const app = new App<{ import: any; emit: typeof emit }>({
|
||||
export const app = new App<{ import: any; emit: typeof emit; sequelize: typeof sequelize }>({
|
||||
serverOptions: {
|
||||
cors: {
|
||||
origin: '*',
|
||||
@@ -21,6 +22,7 @@ export const app = new App<{ import: any; emit: typeof emit }>({
|
||||
routerContext: {
|
||||
import: dynamicImport,
|
||||
emit,
|
||||
sequelize,
|
||||
},
|
||||
// routerHandle(res) {
|
||||
// console.log('routerHandle', res.query);
|
||||
|
||||
Reference in New Issue
Block a user