Skip to content

Commit

Permalink
Revert
Browse files Browse the repository at this point in the history
  • Loading branch information
scienmanas committed Aug 11, 2024
1 parent c625f66 commit abb6278
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 458 deletions.
Binary file removed Website/Backend/Manas.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions Website/Backend/config/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import mongoose from "mongoose";
export async function connectToDB(): Promise<void> {
try {
// Database Uri
const MONGO_URI: string = process.env.MONGO_TEST_URI as string;
// const MONGO_URI: string = process.env.MONGO_PROD_URI as string;
// const MONGO_URI: string = process.env.MONGO_TEST_URI as string;
const MONGO_URI: string = process.env.MONGO_PROD_URI as string;

// logs
console.log("Connecting to Mongo Db :|");
Expand Down
6 changes: 2 additions & 4 deletions Website/Backend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { connectToDB } from "./config/db";
// Routes import
import certificatesRoute from "./routes/certificate";
import authRoute from "./routes/auth";
import sendEmailsRoute from './routes/sendEmails';

// Load the env
config();
Expand All @@ -19,8 +18,8 @@ const PORT: string = process.env.PORT || "5000";

// CORS configuration
const corsConfiguration = {
// origin: ["https://certimailer.xyz"],
origin: ["*"],
origin: ["https://certimailer.xyz"],
// origin: ["*"],
optionSucessStatus: 200,
};

Expand All @@ -31,7 +30,6 @@ app.use(cors(corsConfiguration));
// Routes
app.use("/api/certificate", certificatesRoute);
app.use("/api/auth", authRoute);
app.use('/api/send-email', sendEmailsRoute);

// Landing endpoint
app.get("/", (req: Request, res: Response) => {
Expand Down
183 changes: 1 addition & 182 deletions Website/Backend/package-lock.json

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

6 changes: 1 addition & 5 deletions Website/Backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
"@types/dotenv": "^6.1.1",
"@types/express": "^4.17.21",
"@types/mongoose": "^5.11.96",
"@types/multer": "^1.4.11",
"@types/node": "^22.2.0",
"@types/nodemailer": "^6.4.15",
"nodemon": "^3.1.4",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
Expand All @@ -30,8 +28,6 @@
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"mongoose": "^8.5.2",
"multer": "^1.4.5-lts.1",
"nodemailer": "^6.9.14"
"mongoose": "^8.5.2"
}
}
Loading

0 comments on commit abb6278

Please sign in to comment.