Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: add ability to change HOST url

thecodrr1058ae990985
diff --git a/packages/core/api/index.js b/packages/core/api/index.js
index c5afaf6a9..53f7c2ccc 100644
--- a/packages/core/api/index.js
+++ b/packages/core/api/index.js
@@ -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;
diff --git a/packages/core/utils/constants.js b/packages/core/utils/constants.js
index f5a764446..21b916ce4 100644
--- a/packages/core/utils/constants.js
+++ b/packages/core/utils/constants.js
@@ -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";