Welcome to the Ticketwave backend repository! This Node.js application serves as the backend for the Ticketwave-Frontend app, utilizing Express.js for handling API routes and MongoDB Atlas as the database. Follow the instructions below to install and implement the code.
-
Clone the repository:
git clone https://github.com/evitadasy/Ticketwave-Backend.git
-
Navigate to the project directory:
cd ticketwave-backend
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory and configure it with your MongoDB Atlas connection string and any other necessary environment variables. You can use the provided.env.example
as a starting point. -
Start the server:
npm start
The server will be running on http://localhost:3000
.
The application uses a .env
file for configuration. Ensure that you have the following variables set:
MONGODB_URI
: Your MongoDB Atlas connection string.- (Add any other environment variables specific to your application.)
Example .env
file:
MONGODB_URI=mongodb+srv://<username>:<password>@cluster0.mongodb.net/<database>?retryWrites=true&w=majority
- GET /api/cities
- GET /api/cities/:cityName
- GET /api/bookings
- POST /api/bookings/:eventId
- GET /api/events
- GET /api/events/:eventId
- GET /api/events/type/:eventType/:city
- GET /api/events/type/:eventType
- GET /api/events/city/:city
Feel free to inspect the code in the routes directory to understand available endpoints and functionalities.
The Ticketwave backend is currently deployed on Render at https://bookify-zm4t.onrender.com. Ensure that you update your frontend application to make requests to this endpoint.