feat: add redis
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
import { App } from '@abearxiong/router';
|
||||
import { useConfig } from '@abearxiong/use-config';
|
||||
import { dynamicImport } from './lib/dynamic-import.ts';
|
||||
import { redisPublisher } from './modules/redis.ts';
|
||||
|
||||
useConfig();
|
||||
export const emit = (channel: string, message: string) => {
|
||||
redisPublisher.publish(channel, message);
|
||||
};
|
||||
|
||||
export const app = new App({
|
||||
serverOptions: {
|
||||
@@ -12,5 +16,6 @@ export const app = new App({
|
||||
},
|
||||
routerContext: {
|
||||
import: dynamicImport,
|
||||
emit,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user