feat: add ability to change HOST url

This commit is contained in:
thecodrr
2020-09-19 11:36:37 +05:00
parent 2aa0fa592c
commit 1058ae9909
2 changed files with 7 additions and 1 deletions

View File

@@ -114,6 +114,12 @@ class Database {
sync() {
return this.syncer.start();
}
host(host) {
if (process.env.NODE_ENV !== "production") {
HOST = host || HOST;
}
}
}
export default Database;

View File

@@ -1,4 +1,4 @@
export const HOST =
export var HOST =
process.env.NODE_ENV === "production"
? "https://api.notesnook.com"
: "http://0.0.0.0:8000";