This server side is developed for the TouristaTrek website, your ultimate guide to exploring the diverse and vibrant region of Southeast Asia. The server handles backend operations, including user authentication, database interactions, and API integrations.
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JWT (JSON Web Tokens)
- Deployment: Heroku
- Register User
- Endpoint:
/api/auth/register
- Method:
POST
- Description: Register a new user.
- Endpoint:
- Login User
- Endpoint:
/api/auth/login
- Method:
POST
- Description: Login an existing user.
- Endpoint:
- Get All Destinations
- Endpoint:
/api/destinations
- Method:
GET
- Description: Retrieve a list of all tourist destinations.
- Endpoint:
- Get Destination by ID
- Endpoint:
/api/destinations/:id
- Method:
GET
- Description: Retrieve details of a specific destination by ID.
- Endpoint:
- Add New Destination
- Endpoint:
/api/destinations
- Method:
POST
- Description: Add a new tourist destination.
- Endpoint:
- Update Destination
- Endpoint:
/api/destinations/:id
- Method:
PUT
- Description: Update details of an existing destination.
- Endpoint:
- Delete Destination
- Endpoint:
/api/destinations/:id
- Method:
DELETE
- Description: Delete a destination by ID.
- Endpoint:
- Get All Bookings
- Endpoint:
/api/bookings
- Method:
GET
- Description: Retrieve a list of all bookings.
- Endpoint:
- Get Booking by ID
- Endpoint:
/api/bookings/:id
- Method:
GET
- Description: Retrieve details of a specific booking by ID.
- Endpoint:
- Create Booking
- Endpoint:
/api/bookings
- Method:
POST
- Description: Create a new booking.
- Endpoint:
- Update Booking
- Endpoint:
/api/bookings/:id
- Method:
PUT
- Description: Update details of an existing booking.
- Endpoint:
- Delete Booking
- Endpoint:
/api/bookings/:id
- Method:
DELETE
- Description: Delete a booking by ID.
- Endpoint:
- Clone this repository to your local machine:
git clone https://github.com/yourusername/touristatrek-server.git
for run this [sever side] run the command [npm install] [nodemon.index] in terminal