set backend and version env

This commit is contained in:
2022-05-02 19:20:44 +08:00
parent 93e18d2704
commit 9b2b8d71b5
4 changed files with 13 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ import renderMd from './Markdown';
export { format_time, Time, TitleLine };
export const API_BASE = '/_api/v1';
export const API_BASE = `${process.env.REACT_APP_BACKEND || '/'}_api/v1`;
// https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
function escape_regex(string) {