First, clone the project to your computer and navigate to the project directory.
This project requires several packages. We will use the following:
axios: to fetch datamysql2: to interact with the databaseexpress: to create the APIcors: to handle cross-origin requestsvue-router: to navigate between pages
All required packages are specified in the package.json file. To install them, run the following command:
npm installCreate a .env file in the base directory of the project with the following content:
DB_HOST=your_host
DB_USER=your_user
DB_PASSWORD=your_password
DB_NAME=your_db_name
DB_PORT=your_port
Execute the creation_database.sql script to populate the database.
Open two terminals and navigate to the project directory:
-
To launch the server, run:
node server.js
-
To launch the client, run:
npm run dev