blob: ad00fbb73e5f84bf06bd1d4751ea2ff31402ce2d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import { FileStorage } from "./FileStorage";
export interface Storage {
set(hash: string, data: any, prefix?: string): Promise<void>;
get(hash: string, prefix?: string): Promise<any>;
}
var storage: Storage;
if (process.env.STORAGE_PROVIDER === "file") {
storage = new FileStorage();
}
export { storage };
|