Skip to content

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

monograph: fix `process is not defined`

Abdullah Atta33e64416f328
diff --git a/apps/monograph/app/utils/env.ts b/apps/monograph/app/utils/env.ts
index cd4d13ba4..d99cf3272 100644
--- a/apps/monograph/app/utils/env.ts
+++ b/apps/monograph/app/utils/env.ts
@@ -17,6 +17,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-export const API_HOST = process.env.API_HOST || `https://api.notesnook.com`;
+export const API_HOST =
+ import.meta.env.API_HOST ||
+ process.env.API_HOST ||
+ `https://api.notesnook.com`;
export const PUBLIC_URL =
- process.env.PUBLIC_URL || `http://localhost:${process.env.PORT || 5017}`;
+ import.meta.env.PUBLIC_URL ||
+ process.env.PUBLIC_URL ||
+ `http://localhost:${import.meta.env.PORT || process.env.PORT || 5017}`;