Welcome to the Natours project! This repository contains the source code for a fictional tour booking website called Natours, built as a learning project to demonstrate web development skills. The project is built using modern web technologies including Node.js, Express, MongoDB, and more.
- User authentication and authorization
- Secure password handling with encryption
- Booking management
- Tour management (CRUD operations)
- User reviews and ratings for tours
- API documentation
- Node.js
- Express.js
- MongoDB & Mongoose
- JavaScript
- Git
To get a local copy of this project up and running, follow these simple steps.
Make sure you have the following installed:
- Clone the repository:
git clone https://github.com/RushinShah22/natours.git
- Navigate to the project directory:
cd natours
- Install dependencies:
npm install
Set up environment variables: Create a .env file in the root directory and add your configuration values:
Copy code
NODE_ENV=development
DATABASE=<your_mongoDB_connection_string>
DATABASE_PASSWORD=<your_database_password>
JWT_SECRET=<your_jwt_secret>
Ensure that your MongoDB instance is running and accessible.
Running the Application Start the development server:
use docker to run a container.
Open your browser and visit:
Sign up and log in to book a tour. Manage your bookings and reviews through your user account.
natours/
│
├── controllers/ # Controller functions
├── models/ # Mongoose models
├── public/ # Static files (CSS, JS, images)
├── routes/ # Express routes
├── views/ # Pug templates
├── app.js # Express application
├── server.js # Server entry point
├── package.json # Project dependencies and scripts
└── README.md # Project documentation