Merge pull request #178 from hyperspacedev/develop-1.1.0-mod-and-localtest

Auto-set localhost:3000 URL when testing
This commit is contained in:
Marquis Kurt 2020-02-25 22:24:29 -05:00 committed by GitHub
commit 4e64a1d4f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -140,11 +140,17 @@ export async function getConfig(): Promise<Config | undefined> {
let { location } = resp.data;
if (!location.endsWith("/")) {
console.warn(
console.info(
"Location does not have a backslash, so Hyperspace has added it automatically."
);
resp.data.location = location + "/";
}
if (process.env.NODE_ENV === "development") {
resp.data.location = "http://localhost:3000/";
console.info("Location field has been updated to localhost:3000.");
}
return resp.data as Config;
} catch (err) {
console.error(