From 96bd006e4c43f3a032ef840cca93b49f7e571bc5 Mon Sep 17 00:00:00 2001
From: Angelo Reale <12191809+angeloreale@users.noreply.github.com>
Date: Thu, 8 Aug 2024 14:24:10 +0100
Subject: [PATCH] ar(fix) [DPTM-2]: Ensure autonomous Dev environment (#35)
* ar(fix) [DPTM-2]: Ensure autonomous Dev environment
* ar(fix) [DPTM-2]: Ensure autonomous Dev environment
---
.env.public | 4 +++-
README.md | 3 ++-
lib/auth/constants.ts | 6 +++---
next.config.js | 2 +-
src/app/components/client/elements/link-decorator.tsx | 2 +-
5 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/.env.public b/.env.public
index 35595232..16c37935 100644
--- a/.env.public
+++ b/.env.public
@@ -10,6 +10,8 @@
# env specific
API_HOST_DEV=
API_HOST=http://localhost:3001
+NEXUS_HOST=http://localhost:3000
+MAIN_URL=http://localhost:2999
# context specific
GITHUB_ID=
@@ -48,7 +50,7 @@ MONGODB_DEFAULT_ORG=yourorg
# @@@ WARNING: THESE APPEAR IN THE BROWSER OF EVERY VISITOR @@@
# base path: client (browser)
-NEXT_PUBLIC_NEXUS_HOST=
+NEXT_PUBLIC_MAIN_URL=http://localhost:2999
NEXT_PUBLIC_NEXUS_BASE_PATH=
NEXT_PUBLIC_NEXUS_NAME=Nexus
NEXT_PUBLIC_NEXUS_LOGO_PATH=
diff --git a/README.md b/README.md
index 869398a5..e8d3e2b8 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,8 @@ npm run dev
Documentation: TBD
-Staging Environment: https://alpha.dreampip.com
+Dev Environment: https://dev.nyx.dreampip.com
+Prod Environment: https://nyx.dreampip.com
License: HPL3-ECO-AND-ANC 2021—Present
diff --git a/lib/auth/constants.ts b/lib/auth/constants.ts
index 6c4ff121..5f5fe18a 100644
--- a/lib/auth/constants.ts
+++ b/lib/auth/constants.ts
@@ -11,7 +11,7 @@ const methods = {
signIn: () => {},
signOut: async () => {
try {
- const response = await fetch(`${process.env.NEXT_PUBLIC_NEXUS_HOST}/api/v1/auth/signout`, {
+ const response = await fetch(`${process.env.NEXT_PUBLIC_MAIN_URL}/api/v1/auth/signout`, {
method: 'POST',
headers: {
Accept: 'application/json',
@@ -26,7 +26,7 @@ const methods = {
},
getCsrf: async () => {
try {
- const response = await fetch(`${process.env.NEXT_PUBLIC_NEXUS_HOST}/api/v1/auth/csrf`, {
+ const response = await fetch(`${process.env.NEXT_PUBLIC_MAIN_URL}/api/v1/auth/csrf`, {
method: 'GET',
headers: {
Accept: 'application/json',
@@ -41,7 +41,7 @@ const methods = {
},
getSession: async (params = { cookies: '' }) => {
try {
- const response = await fetch(`${process.env.NEXT_PUBLIC_NEXUS_HOST}/api/v1/auth/session`, {
+ const response = await fetch(`${process.env.NEXT_PUBLIC_MAIN_URL}/api/v1/auth/session`, {
method: 'GET',
headers: {
Accept: 'application/json',
diff --git a/next.config.js b/next.config.js
index 212f38ae..832de795 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,7 +1,7 @@
/** @type {import('next').NextConfig} */
const { withSentryConfig } = require('@sentry/nextjs');
const nextConfig = {
- assetPrefix: process.env.MAIN_URL || 'https://nyx.dreampip.com',
+ assetPrefix: process.env.NEXUS_HOST || 'https://nyx.dreampip.com',
transpilePackages: ['next-auth'],
images: {
remotePatterns: [
diff --git a/src/app/components/client/elements/link-decorator.tsx b/src/app/components/client/elements/link-decorator.tsx
index 95d9e7c8..04bac103 100644
--- a/src/app/components/client/elements/link-decorator.tsx
+++ b/src/app/components/client/elements/link-decorator.tsx
@@ -4,6 +4,6 @@ import { Link as DPLink } from "@dreampipcom/oneiros"
export const DPLinkDec = (props: any) => {
return (
-
+
);
};