This is a simple firearms e-commerce platform with a backend API using Node.js, Express.js, and MySQL, and a frontend built using Vue.js and TailwindCSS.
First, clone the repository to your local machine:
git clone https://github.com/clicky4u/Firearms-E-Commerce-Platform
After cloning, navigate to the Backend
directory and start the server:
cd Firearms-E-Commerce-Platform/Backend
node server.js
This will start the backend server on localhost:3000
.
Open a new terminal window or command prompt, navigate to the web1-dev1
folder, and run the frontend:
cd Firearms-E-Commerce-Platform/web1-dev1
npm run dev
This will start the Vue.js frontend on localhost:8080
.
Make sure you have MySQL installed on your machine. Create a database named mydb
and configure your connection settings in the .env
file (if necessary).
Ensure the .env
file (located in the Backend
folder) has the correct MySQL database credentials:
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=yourpassword
DB_NAME=mydb
Once both the backend and frontend are running, you can open your browser and visit the frontend at http://localhost:8080
. The backend API can be accessed at http://localhost:3000
.
-
Backend:
- Node.js
- Express.js
- MySQL
cors
,body-parser
,mysql2
-
Frontend:
- Vue.js
- TailwindCSS