- Intellij (Community/ Ultimate Edition)
- PostgreSQL + pgAdmin
- Any web browser (Google, Microsoft Edge, Firefox)
- Github
- Docker
To set up the backend of the Book Social Network project, follow these steps:
- Clone the repository:
git clone https://github.com/PhuNguyenPT/Project-PE.git
cd Project-PE
- Create a new database in pgAdmin 4 with the name
shopping_cart
- Change docker-compose.yml
environment:
POSTGRES_PASSWORD: to your database password
- Change src/main/resources/application.yaml
datasource:
password: to your database password
- Run the docker-compose file in a terminal
docker-compose up
- Install dependencies (assuming Maven is installed) and run application in a second terminal for backend:
cd ./Shopping_Cart_API
mvn clean install
java -jar target/shopping-cart-api-0.0.1-SNAPSHOT.jar
- Load the data into the database by running the following command in the terminal:
Open a command prompt and navigate to the bin directory where the psql.exe file is located. This is typically located in the C:\Program Files\PostgreSQL\16\bin directory. Run the following command to connect to the database:
pg_restore -U postgres -d shopping_cart absolute\path\toShopping_Cart_API\src\main\resources\shopping_cart.sql
The database path cannot contain folders with spaces. Please enter the password when prompted.
- Install dependencies and run application in a third terminal for frontend:
cd ./Shopping_Cart
npm install
npm run serve