Extract backend URLs into environment variables (#1772) (#1848)

This commit is contained in:
Minh Nguyen 2020-07-02 16:52:58 +01:00 committed by GitHub
parent b21f723eee
commit 8621ddb6a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 4 deletions

10
src/global.d.ts vendored
View file

@ -13,6 +13,16 @@ interface Window {
__EXCALIDRAW_SHA__: string;
}
// https://github.com/facebook/create-react-app/blob/ddcb7d5/packages/react-scripts/lib/react-app.d.ts
declare namespace NodeJS {
interface ProcessEnv {
readonly REACT_APP_BACKEND_V1_GET_URL: string;
readonly REACT_APP_BACKEND_V2_GET_URL: string;
readonly REACT_APP_BACKEND_V2_POST_URL: string;
readonly REACT_APP_SOCKET_SERVER_URL: string;
}
}
interface Clipboard extends EventTarget {
write(data: any[]): Promise<void>;
}