diff --git a/services/telegram-notifier/src/lib/config.ts b/services/telegram-notifier/src/lib/config.ts index 725fa98a7..a8387e542 100644 --- a/services/telegram-notifier/src/lib/config.ts +++ b/services/telegram-notifier/src/lib/config.ts @@ -12,6 +12,10 @@ export const config = { port: process.env.PORT != null ? +process.env.PORT : 8001, token: process.env.TOKEN ?? 'YOUR_SECRET_TOKEN', }, + storage: { + path: process.env.STORAGE_PATH ?? 'db', + name: 'notifier-storage', + }, telegramBot: { token: telegramBotToken, }, diff --git a/services/telegram-notifier/src/lib/storage.ts b/services/telegram-notifier/src/lib/storage.ts index 961711b00..fce364a8d 100644 --- a/services/telegram-notifier/src/lib/storage.ts +++ b/services/telegram-notifier/src/lib/storage.ts @@ -1,5 +1,6 @@ import {AlwatrStorageEngine} from '@alwatr/storage-engine'; +import {config} from './config'; import {MemberList} from './type'; -export const storage = new AlwatrStorageEngine({name: 'notifier-storage', path: '_data'}); +export const storage = new AlwatrStorageEngine(config.storage);