Welcome to the Natours API! 🚀 This API powers the Natours application, providing endpoints to manage tours, users, reviews, and more. Explore the wonders of the world with us!
The Natours API allows you to:
- Explore exciting tours around the globe 🌎
- Manage user profiles and authentication 🔑
- Submit and view reviews ✍️
- Handle bookings and more!
Here are some screenshots of the Natours application:
To get started with the Natours API, follow these steps:
-
Clone the Repository:
git clone https://github.com/AnasHany2193/Natours-API.git cd Natours-API -
Install Dependencies:
npm install
-
Setup Environment Variables: Create a
.envfile in the root directory and add the following:PORT=3000 DATABASE=your_database_url EMAIL_FROM=your_email@example.com SENDGRID_USERNAME=your_sendgrid_username SENDGRID_PASSWORD=your_sendgrid_password
-
Start the Server:
npm start
Your API will be running on http://localhost:3000.
Here are some of the main endpoints available:
-
Tours:
GET /api/v1/tours- Get all toursPOST /api/v1/tours- Create a new tourGET /api/v1/tours/:id- Get a specific tourPATCH /api/v1/tours/:id- Update a tourDELETE /api/v1/tours/:id- Delete a tour
-
Users:
GET /api/v1/users- Get all usersPOST /api/v1/users- Create a new userGET /api/v1/users/:id- Get a specific userPATCH /api/v1/users/:id- Update a userDELETE /api/v1/users/:id- Delete a user
-
Reviews:
GET /api/v1/reviews- Get all reviewsPOST /api/v1/reviews- Create a new reviewGET /api/v1/reviews/:id- Get a specific reviewPATCH /api/v1/reviews/:id- Update a reviewDELETE /api/v1/reviews/:id- Delete a review
For a detailed view of all available endpoints, check out our Postman Documentation API.
After running the server, you can interact with the API endpoints using tools like Postman or cURL. Ensure to include necessary headers and parameters for requests.
This project was built with guidance from Jonas Schmedtmann's course on Udemy. You can check out the course here. 🌟
For any questions or suggestions, feel free to reach out:
- LinkedIn: Anas Hany
- GitHub: AnasHany2193


