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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
219 changes: 212 additions & 7 deletions app-backend/package-lock.json

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

1 change: 1 addition & 0 deletions app-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"multer": "^2.0.2",
"nodemailer": "^7.0.5",
"pdfkit": "^0.18.0",
"socket.io": "^4.8.3",
"swagger-jsdoc": "^6.2.8",
"swagger-ui-express": "^5.0.1"
},
Expand Down
11 changes: 9 additions & 2 deletions app-backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import dotenv from 'dotenv';
import connectDB from './src/config/connectDB.js';
import app from './src/app.js';
import { initSocket } from './src/utils/socket.js';

dotenv.config();

Expand All @@ -10,14 +11,20 @@ const PORT = process.env.PORT || 3000;
const startServer = async () => {
try {
await connectDB();
app.listen(PORT, '0.0.0.0', () => {


const server = app.listen(PORT, '0.0.0.0', () => {
console.log(`🚀 Server running on http://localhost:${PORT}`);
console.log(`📘 Swagger UI: http://localhost:${PORT}/api-docs`);
console.log(`🔌 WebSocket server ready for real-time notifications`);
});

initSocket(server);

} catch (err) {
console.error('❌ Failed to start server:', err.message);
process.exit(1);
}
};

startServer();
startServer();
1 change: 0 additions & 1 deletion app-backend/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import setupSwagger from './config/swagger.js'; // ✅ now using ES module impor
import { auditMiddleware } from "./middleware/logger.js";
import path from 'path';
import { fileURLToPath } from 'url';

const app = express();

app.use(helmet());
Expand Down
Loading
Loading