Skip to content

Commit

Permalink
Merge pull request #1 from Amarjha01/local-environment
Browse files Browse the repository at this point in the history
changes backend end point
  • Loading branch information
Amarjha01 authored Aug 25, 2024
2 parents e814dbf + f5a220f commit 64e4cf6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/src/common/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const backendDomain = 'http://localhost:5000';
const backendDomain = 'http://my-backend-app-env.eba-qrjj9aqa.ap-south-1.elasticbeanstalk.com';
// const backendDomain = 'http://192.168.45.146:5000';

const summaryApi = {
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/pages/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import signin from '../asset/signin.gif'
import { Link , useNavigate} from 'react-router-dom';
import { toast } from "react-toastify";
import context from '../context/index.js';
import summaryApi from '../common/index.jsx';
import './pages.css'


Expand All @@ -29,9 +30,9 @@ const handleOnChange =(e) =>{

const handleSubmit = async (e) =>{
e.preventDefault();
const dataResponse = await fetch('http://localhost:5000/api/signin',{
// const dataResponse = await fetch('http://192.168.45.146:5000/api/signin',{
method:"post",
const dataResponse = await fetch(summaryApi.signIn.url,{

method:summaryApi.signIn.method,
credentials:'include',
headers:{
'Content-Type':'application/json'
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/pages/Signup.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState } from "react";
import signin from "../asset/signin.gif";
import { Link, useNavigate } from "react-router-dom";
import summaryApi from "../common/index.jsx";

import "./pages.css";

Expand Down Expand Up @@ -34,8 +35,8 @@ const signup = () => {
e.preventDefault();

if (data.password === data.confirmpassword) {
const dataResponse = await fetch("http://localhost:5000/api/signup", {
method: "post",
const dataResponse = await fetch(summaryApi.signUp.url, {
method: summaryApi.signUp.method,
headers: {
"Content-Type": "application/json",
},
Expand Down

0 comments on commit 64e4cf6

Please sign in to comment.