Welcome to the E-Commerce Website project! This web application provides a platform for users to browse, purchase products, and manage their accounts. Built using Node.js, Express, and Mongoose, this project ensures a seamless shopping experience with essential e-commerce functionalities.
- User Registration: New users can create an account to access the website's features.
- User Login with Authentication: Registered users can log in securely using their credentials.
- Product Management: Admin users can create products and add feature images.
- Add to Cart: Users can add products to their cart for purchase.
- User Logout: Users can log out, with their session managed through cookies.
- Node.js: JavaScript runtime built on Chrome's V8 JavaScript engine.
- Express: A fast, unopinionated, minimalist web framework for Node.js.
- Mongoose: Elegant MongoDB object modeling for Node.js.
- Cookie-Parser: Middleware to handle cookies.
- Multer: Middleware for handling file uploads.
Ensure you have the following installed on your local machine:
- Node.js
- npm (Node Package Manager)
- MongoDB Compass
- Postman
- Clone the repository:
git clone https://github.com/yourusername/e-commerce-website.git
cd e-commerce-website
-
Install dependencies:
npm install
-
Set up environment variables:
- MONGO_URI = your_mongodb_connection_string
- SECRET = your_secret_key
-
Start the server:
npm start
-
Open your browser and navigate to:
http://localhost:3000