Skip to content

Commit

Permalink
url updated
Browse files Browse the repository at this point in the history
  • Loading branch information
priyam-03 committed Aug 11, 2024
1 parent d162591 commit ec20d76
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
13 changes: 5 additions & 8 deletions backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ app.use(bodyParser.urlencoded({ extended: true }));
if (process.env.NODE_ENV === "PRODUCTION") {
app.use(
cors({
origin: process.env.CLIENT_URL,
origin: "http://localhost:3000",
credentials: true,
})
);
Expand Down Expand Up @@ -76,13 +76,10 @@ process.on("uncaughtException", (err) => {
process.exit(1);
});

// Config
if (process.env.NODE_ENV !== "PRODUCTION") {
require("dotenv").config({ path: "./config.env" });
}

// Connecting to database
connectDatabase();
+(
// Connecting to database
connectDatabase()
);

const server = http.createServer(app);

Expand Down
2 changes: 1 addition & 1 deletion backend/socketServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const serverStore = require("./serverStore");
const registerSocketServer = (server) => {
let url;
if (process.env.NODE_ENV === "PRODUCTION") {
url = process.env.CLIENT_URL;
url = "http://localhost:3000";
} else {
url = "http://localhost:3000";
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "frontend",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:4000",
"proxy": "https://api.recruitingwebsite.online",
"dependencies": {
"@chakra-ui/icons": "^2.1.1",
"@chakra-ui/react": "^2.8.2",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/realtimeCommunication/socketConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let socket = null;

export const connectWithSocketServer = (userInfo) => {
const jwtToken = userInfo.token;
const connection_url = "http://127.0.0.1:4000/"
const connection_url = "https://api.recruitingwebsite.online/";
// Update this URL with your server's local network IP
socket = io(
connection_url,
Expand Down

0 comments on commit ec20d76

Please sign in to comment.