Emi Matchu
6763e9454e
To activate this, I created a `.env.development` file in my project root, with the following content: ```env IMPRESS_2020_ORIGIN=http://localhost:4000 ``` Then, I started impress-2020 with `yarn dev --port=4000`. Now, the app loads from there, hooray!! It even fixes that obnoxious pet state ID bug that happens when you run against the production db lol
10 lines
325 B
JavaScript
10 lines
325 B
JavaScript
const IMPRESS_2020_ORIGIN = readImpress2020Origin();
|
|
|
|
export function buildImpress2020Url(path) {
|
|
return new URL(path, IMPRESS_2020_ORIGIN).toString();
|
|
}
|
|
|
|
function readImpress2020Origin() {
|
|
const node = document.querySelector("meta[name=impress-2020-origin]");
|
|
return node?.content || "https://impress-2020.openneo.net"
|
|
}
|