Skip to content

Commit

Permalink
Merge pull request #243 from haseebzaki-07/new_branch_%
Browse files Browse the repository at this point in the history
Added Booking Confirmation
  • Loading branch information
dhairyagothi authored Oct 16, 2024
2 parents 0f3fb48 + 89d47a9 commit b2741e8
Show file tree
Hide file tree
Showing 5 changed files with 990 additions and 502 deletions.
3 changes: 3 additions & 0 deletions backend/controllers/coolieController.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { io } from "../index.js";
import CoolieBooking from "../models/CoolieBooking.js";




export const createCoolieBooking = async (req, res) => {
try {
const {
Expand Down
6 changes: 5 additions & 1 deletion backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import cookieParser from "cookie-parser";
import { createServer } from "http";
import { Server } from "socket.io";



const app = express();
const server = createServer(app);

Expand All @@ -26,9 +28,11 @@ app.use(express.urlencoded({ extended: true }));
connectDB();

import authRoutes from "./routes/authRoutes.js";
import stationRoutes from "./routes/stationRoutes.js";

app.use("/auth", authRoutes);
app.use("/api", authRoutes);
app.use("/station", stationRoutes);

app.get("/", (req, res) => {
res.send("Working...");
Expand All @@ -45,7 +49,7 @@ const io = new Server(server, {
});

if (process.env.NODE_ENV !== 'production') {
const io = new Server(server, { /* CORS settings */ });

io.on("connection", (socket) => {
console.log("A user connected:", socket.id);
socket.on("disconnect", () => {
Expand Down
Loading

0 comments on commit b2741e8

Please sign in to comment.