summary refs log tree commit diff
path: root/src/util/Storage.ts
blob: 391afa837ec6cdb578b3a7d5d8fbc639043adc9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { FileStorage } from "./FileStorage";

export interface Storage {
	set(path: string, data: any): Promise<void>;
	get(path: string): Promise<any>;
}

var storage: Storage;

if (process.env.STORAGE_PROVIDER === "file") {
	storage = new FileStorage();
}

export { storage };