Motorbike Rentals

Motorbike Rentals

Experience Dalhousie on two wheels. Choose your ride below.

Bike Image

Royal Enfield Classic 350

350cc, 20 HP, Manual Transmission

₹1200/day

				
					const express = require('express');
const bodyParser = require('body-parser');

const app = express();
const PORT = 3000;

// Middlewares
app.use(bodyParser.json());
app.use(express.static('public'));  // Serves static files (HTML, CSS, JS) from 'public' directory

// Example endpoint to fetch bike data
app.get('/api/bikes', (req, res) => {
    // Fetch data from database
    // Example: res.json([{name: 'Royal Enfield Classic 350', rate: 1200}, {...}]);
});

// Example endpoint to handle bookings
app.post('/api/book', (req, res) => {
    const { bikeId, userId, startDate, endDate } = req.body;
    // Handle the booking logic: save to the database, send confirmation email, etc.
    // Send response, e.g., res.json({status: 'Booking successful'});
});

app.listen(PORT, () => {
    console.log(`Server is running on port ${PORT}`);
});