Skip to content

Commit

Permalink
Merge pull request #489 from AliMD/feat/ff-deploy
Browse files Browse the repository at this point in the history
feat(services/telegram-notifier): dynamic storage path
  • Loading branch information
AliMD authored Dec 10, 2022
2 parents 9afb199 + 010fa71 commit 162d912
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions services/telegram-notifier/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
3 changes: 2 additions & 1 deletion services/telegram-notifier/src/lib/storage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {AlwatrStorageEngine} from '@alwatr/storage-engine';

import {config} from './config';
import {MemberList} from './type';

export const storage = new AlwatrStorageEngine<MemberList>({name: 'notifier-storage', path: '_data'});
export const storage = new AlwatrStorageEngine<MemberList>(config.storage);

0 comments on commit 162d912

Please sign in to comment.