This is a simple e-commerce web application built using Node.js, Express.js, and MySQL. It allows users to sign up, login, and browse products. Users can also add products to their cart and place orders.
To run this application locally, follow these steps:
-
Clone the repository to your local machine:
-
Download and Install Node.js
First, you need to download and install Node.js. Follow these steps:
-
Go to the Node.js official website.
-
Click on the "Download" button for the recommended version.
-
Run the installer and follow the prompts to install Node.js on your system.
-
Install Express
Express is a popular web application framework for Node.js. To install Express, open your terminal or command prompt and run the following command:
npm install express
- Install MySQL MySQL is a widely-used open-source relational database management system. To install MySQL package, run the following command:
npm install mysql
- Install Body-parser Body-parser is a middleware that extracts the entire body portion of an incoming request stream and exposes it on req.body. To install Body-parser, run the following command:
npm install body-parser
- Set up the MySQL database:
- Create a MySQL database with the name
node
. - Import the SQL schema from
database.sql
file located in thedatabase
directory.
- Open your web browser and visit
http://localhost
to access the application.
- Express.js: Web application framework for Node.js.
- MySQL: MySQL database driver for Node.js.
- Body-parser: Middleware to parse incoming request bodies.
- Sign up for an account to access the e-shop.
- Browse available products and add them to your cart.
- Proceed to checkout to place an order.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.