Skip to content

Commit

Permalink
ar(fix) [DPTM-2]: Ensure autonomous Dev environment (#35)
Browse files Browse the repository at this point in the history
* ar(fix) [DPTM-2]: Ensure autonomous Dev environment

* ar(fix) [DPTM-2]: Ensure autonomous Dev environment
  • Loading branch information
angeloreale authored Aug 8, 2024
1 parent 30e8fb8 commit 96bd006
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .env.public
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions lib/auth/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -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: [
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/client/elements/link-decorator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { Link as DPLink } from "@dreampipcom/oneiros"

export const DPLinkDec = (props: any) => {
return (
<DPLink host={process?.env?.NEXT_PUBLIC_NEXUS_HOST?.replace('https://', '').replace('http://', '')} {...props} />
<DPLink host={process?.env?.NEXT_PUBLIC_MAIN_URL?.replace('https://', '').replace('http://', '')} {...props} />
);
};

0 comments on commit 96bd006

Please sign in to comment.