Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 11 additions & 2 deletions Backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@
"name": "backend",
"version": "1.0.0",
"main": "server.js",
"type": "module",
"scripts": {
"start": "nodemon server.js"
"start": "node server.js",
"dev": "nodemon server.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"bcrypt": "^6.0.0",
"cloudinary": "^2.7.0",
"cookie-parser": "^1.4.7",
"cors": "^2.8.5",
"dotenv": "^17.2.1",
"express": "^5.1.0",
"fs": "^0.0.1-security",
"jsonwebtoken": "^9.0.2",
"mongoose": "^8.16.5"
"mongoose": "^8.16.5",
"multer": "^2.0.2"
},
"devDependencies": {
"nodemon": "^3.1.10"
}
}
31 changes: 26 additions & 5 deletions Backend/server.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
const http = require("http");
const app = require("./app");
const port = process.env.PORT;
import express from "express";
import http from "http";
import dotenv from "dotenv";
import cookieParser from "cookie-parser";
import cors from "cors";

dotenv.config(); // Load .env file

const app = express();

// Middlewares
app.use(cors());
app.use(express.json());
app.use(cookieParser());

// Simple test route
app.get("/", (req, res) => {
res.send("🚀 Backend is working fine!");
});

// Port setup
const PORT = process.env.PORT || 5000;

// Create HTTP server
const server = http.createServer(app);
server.listen(port, () => {
console.log(`Server was running at ${port}`);

server.listen(PORT, () => {
console.log(`✅ Server is running at http://localhost:${PORT}`);
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
2 changes: 1 addition & 1 deletion frontend/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>
<div class="auth-wrapper">
<div class="auth-image">
<img src="login.png" alt="Login Illustration" />
<img src="assets/img/login.png" alt="Login Illustration" />
</div>
<div class="auth-card">
<h2>Sign In</h2>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions server/.env-example

This file was deleted.

2 changes: 0 additions & 2 deletions server/.gitignore

This file was deleted.

16 changes: 0 additions & 16 deletions server/node_modules/.bin/mkdirp

This file was deleted.

17 changes: 0 additions & 17 deletions server/node_modules/.bin/mkdirp.cmd

This file was deleted.

28 changes: 0 additions & 28 deletions server/node_modules/.bin/mkdirp.ps1

This file was deleted.

Loading