-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.ts
More file actions
19 lines (16 loc) · 850 Bytes
/
config.ts
File metadata and controls
19 lines (16 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import * as minio from "minio";
/** Configuration for the minio client with fallback to a local minio server */
export const minioConfig: minio.ClientOptions = (() => {
const endPoint = process.env.STORAGE_ENDPOINT ?? "localhost";
const accessKey = process.env.STORAGE_ACCESS_KEY ?? "minioadmin";
const secretKey = process.env.STORAGE_SECRET_KEY ?? "minioadmin";
const region = process.env.STORAGE_REGION;
const isLocalhost = endPoint === "localhost";
const port = isLocalhost ? 9000 : undefined;
const useSSL = !isLocalhost;
return { endPoint, accessKey, secretKey, region, port, useSSL };
})();
/** Storage bucket name */
export const storageBucket = process.env.STORAGE_BUCKET ?? "storage.jsdocs.io";
/** Use prerendering for known/popular packages */
export const prerenderPackages = process.env.PRERENDER_PACKAGES === "true";