update
This commit is contained in:
14
agent/app.ts
Normal file
14
agent/app.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { QueryRouterServer as App } from '@kevisual/router'
|
||||
import { useContextKey } from '@kevisual/context'
|
||||
import { useConfig } from '@kevisual/use-config'
|
||||
import { CNB } from '../src/index.ts';
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
export const config = useConfig()
|
||||
export const cnb = useContextKey<CNB>('cnb', () => {
|
||||
return new CNB({ token: config.CNB_TOKEN, cookie: config.CNB_COOKIE, group: config.CNB_GROUP });
|
||||
})
|
||||
export const appId = nanoid();
|
||||
export const app = useContextKey<App>('app', () => {
|
||||
return new App()
|
||||
})
|
||||
Reference in New Issue
Block a user