This repository contains the code for the Natour project developed following the "Node.js, Express, MongoDB & More: The Complete Bootcamp 2023" course on Udemy. The course, available at this link, provides a comprehensive guide to building a full-stack web application using Node.js, Express, MongoDB, and other related technologies.
The Natour project is a web application for booking and managing tours. It allows users to view available tours, create an account, book tours, make payments, and manage their bookings. The project covers various aspects of web development, including user authentication, data modelling with MongoDB, server-side rendering, API development, error handling, file uploads, and more.
The following technologies were used in the development of the Natour project:
- Node.js: A JavaScript runtime environment that allows executing JavaScript code on the server-side.
- Express: A web application framework for Node.js that provides a set of features and utilities for building web applications.
- MongoDB: A NoSQL document database that stores data in a flexible, JSON-like format.
- Mongoose: An Object Data Modeling (ODM) library for MongoDB that provides a straightforward way to interact with the database.
- Pug: A template engine for Node.js that simplifies generating dynamic HTML templates.
- JWT (JSON Web Tokens): A standard for creating access tokens that are used for authentication and authorization.
- Multer: A middleware for handling file uploads in Node.js.
- Maildev and Nodemailer: Technology used to send emails and test them.
During the development of the Natour project, I gained the following valuable skills and knowledge:
- Building a RESTful API: I learned how to design and implement a RESTful API using Express and MongoDB, including routes, controllers, and middleware.
- User Authentication and Authorization: The project covered user authentication and authorization using JWT (JSON Web Tokens), allowing secure access to protected routes.
- Data Modeling with MongoDB and Mongoose: I learned how to design and implement data models using MongoDB and Mongoose, defining schemas, relationships, and performing CRUD operations.
- Server-side Rendering with Pug: The project included server-side rendering of dynamic HTML templates using the Pug template engine, allowing for the creation of reusable components.
- File Uploads and Handling: I gained knowledge on handling file uploads using Multer middleware, including validating file types, storing files, and serving them to clients.
- Error Handling and Validation: I learned how to implement error handling and validation techniques, ensuring robustness and data integrity in the application.
- Email Handling: I learned how to set and send emails with node js.
Overall, the Natour project provided a comprehensive hands-on learning experience in building a real-world web application using Node.js, Express, MongoDB, and related technologies.
To run the Natour project locally, follow these steps:
- Clone the repository:
git clone <repository-url>
- Install dependencies:
npm install
- Set up the required environment variables (e.g., database connection URL, etc.).
- Start the application:
npm run start:dev
Please refer to the project's package.json for more commands.
This project was developed as part of the "Node.js, Express, MongoDB & More: The Complete Bootcamp 2023" course on Udemy. Special thanks to the course instructor, Jonas Schmedtmann, for providing an in-depth and comprehensive learning experience.
For any inquiries or questions, please contact [email protected].