Skip to content

Commit

Permalink
Merge pull request #81 from FacundoInza/feat/upload-image-ECR
Browse files Browse the repository at this point in the history
fix: Current enviroment changes
  • Loading branch information
FacundoInza authored Oct 3, 2023
2 parents 0be08ee + 8085ac4 commit c96ad03
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config/development.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export default {
NODE_ENV: process.env.NODE_ENV || 'development',
PORT: process.env.PORT || 3000,
DELIVERIT_API_BASE_URL:
process.env.DELIVERIT_API_BASE_URL || 'http://localhost:5000',
BASE_URL: process.env.DELIVERIT_API_BASE_URL || 'http://localhost:5000',
ACCESS_TOKEN_SECRET: process.env.ACCESS_TOKEN_SECRET || 'mysecrettoken',
NEXT_PUBLIC_GOOGLE_API_KEY: process.env.NEXT_PUBLIC_GOOGLE_API_KEY || '',
Expand Down
4 changes: 3 additions & 1 deletion config/production.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
export default {
NODE_ENV: process.env.NODE_ENV || 'production',
PORT: process.env.PORT || 3000,
BASE_URL: process.env.DELIVERIT_API_BASE_URL || 'http://deliverit.tech',
DELIVERIT_API_BASE_URL:
process.env.DELIVERIT_API_BASE_URL || 'http://api.deliverit.tech',
BASE_URL: process.env.DELIVERIT_API_BASE_URL || 'http://api.deliverit.tech',
ACCESS_TOKEN_SECRET: process.env.ACCESS_TOKEN_SECRET || 'mysecrettoken',
NEXT_PUBLIC_GOOGLE_API_KEY: process.env.NEXT_PUBLIC_GOOGLE_API_KEY || '',
};
3 changes: 2 additions & 1 deletion interceptors/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import currentEnv from '@/config';
import axios from 'axios';
import { cookies } from 'next/dist/client/components/headers';

Expand All @@ -19,7 +20,7 @@ function handleNetworkErrors(error: Error) {

// Configuración de Axios con los interceptores
export const axiosInstance = axios.create({
baseURL: process.env.DELIVERIT_API_BASE_URL,
baseURL: currentEnv.DELIVERIT_API_BASE_URL,
headers: {
'Content-Type': 'application/json',
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"dev": "NODE_ENV=development next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
Expand Down

0 comments on commit c96ad03

Please sign in to comment.