Skip to content

Commit

Permalink
fix: backend fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
IRSHIT033 committed Aug 11, 2023
1 parent 9e9484d commit a72b6be
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 156 deletions.
6 changes: 5 additions & 1 deletion backend/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
MONGOURI=
MONGO_URI=
CLOUD_NAME=
API_KEY=
API_SECRET=
CLIENT_URL=
3 changes: 1 addition & 2 deletions backend/controller/member_controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Member from "../model/Member_model.js";

cloudinary.uploader.upload();
import { v2 as cloudinary } from "cloudinary";

export const handleCreateMember = async (req, res) => {
try {
Expand Down
12 changes: 6 additions & 6 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import dotenv from "dotenv";
import { memberRoute } from "./routes/route.js";
import { v2 as cloudinary } from "cloudinary";

dotenv.config();

cloudinary.config({
cloud_name: process.env.CLOUD_NAME,
api_key: process.env.API_KEY,
api_secret: process.env.API_SECRET,
secure: true,
});

dotenv.config();
connectDB();

const app = express();
Expand All @@ -26,7 +26,7 @@ const port = 5000 || process.env.PORT;

app.use(
cors({
origin: "http://localhost:3000",
origin: process.env.CLIENT_URL,
})
);

Expand Down
1 change: 1 addition & 0 deletions client/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BASE_URL=
2 changes: 2 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ yarn-error.log*
# vercel
.vercel

.env

# typescript
*.tsbuildinfo
next-env.d.ts
2 changes: 1 addition & 1 deletion client/app/register/layout.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import '../../styles/globals.css';
export const metadata = {
title: 'Register',
title: "Student's Chapter CSE",
description: 'Register to become a Member',
};

Expand Down
Loading

0 comments on commit a72b6be

Please sign in to comment.