From d0bfdb4b0e641461dbe863900ecdc934b1d50ac2 Mon Sep 17 00:00:00 2001 From: Augusto Date: Fri, 1 Mar 2024 20:16:09 +0100 Subject: [PATCH] Removing redundant delimiters --- gatewayservice/gateway-service.js | 4 ++-- users/authservice/auth-service.js | 2 +- users/userservice/user-service.js | 2 +- webapp/src/components/Login.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gatewayservice/gateway-service.js b/gatewayservice/gateway-service.js index 88b84c8f..6527df61 100644 --- a/gatewayservice/gateway-service.js +++ b/gatewayservice/gateway-service.js @@ -6,8 +6,8 @@ const promBundle = require('express-prom-bundle'); const app = express(); const port = 8000; -const authServiceUrl = process.env.AUTH_SERVICE_URL || 'http://localhost:8002'; -const userServiceUrl = process.env.USER_SERVICE_URL || 'http://localhost:8001'; +const authServiceUrl = process.env.AUTH_SERVICE_URL ; +const userServiceUrl = process.env.USER_SERVICE_URL ; app.use(cors()); app.use(express.json()); diff --git a/users/authservice/auth-service.js b/users/authservice/auth-service.js index 9764f088..cefbdf8e 100644 --- a/users/authservice/auth-service.js +++ b/users/authservice/auth-service.js @@ -11,7 +11,7 @@ const port = 8002; app.use(express.json()); // Connect to MongoDB -const mongoUri = process.env.MONGODB_URI || 'mongodb://localhost:27017/userdb'; +const mongoUri = process.env.MONGODB_URI; mongoose.connect(mongoUri); // Function to validate required fields in the request body diff --git a/users/userservice/user-service.js b/users/userservice/user-service.js index be958427..b5cd7cb1 100644 --- a/users/userservice/user-service.js +++ b/users/userservice/user-service.js @@ -12,7 +12,7 @@ const port = 8001; app.use(bodyParser.json()); // Connect to MongoDB -const mongoUri = process.env.MONGODB_URI || 'mongodb://localhost:27017/userdb'; +const mongoUri = process.env.MONGODB_URI; mongoose.connect(mongoUri); diff --git a/webapp/src/components/Login.js b/webapp/src/components/Login.js index 0ad6268e..4397a52b 100644 --- a/webapp/src/components/Login.js +++ b/webapp/src/components/Login.js @@ -11,7 +11,7 @@ const Login = () => { const [createdAt, setCreatedAt] = useState(''); const [openSnackbar, setOpenSnackbar] = useState(false); - const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:8000'; + const apiEndpoint = process.env.REACT_APP_API_ENDPOINT; const loginUser = async () => { try {