Important
This Project was only developed for learning purposes and is not intended to be used in production.
The main focus was CORS and the Database Connection
Note
powershell files are for faster server starting
Caution
pgAdmin4 must run, so the Backend can connect to it
- Clone Repository:
git clone https://github.com/sioXD/react_spring-boot_postgres - configure postgres in application.properties
- install react dependencies:
npm install - start all 3 server
SELECT * FROM public."user"; -- user is the table nameTo create a Database in pgAdmin4, go to: (Default Workspace) PostgreSQL 17 > Databases, then right-click on Databases and select Create > Database.
To enter the Query Tool in pgAdmin4, click on the top left button with the database symbol. Then change the Database to your Database.
To check if the table exists, go to: (Default Workspace) PostgreSQL 17 > Databases > yourDatabase > Schemas > public > Tables
in application.properties the:
- "spring.datasource.password" to your password from the pgAdmin installation
- append your database name to "spring.datasource.url"
Then start the server with mvn spring-boot:run
Or run the Java Application File.
npm install # install all dependencies
npm start # start react app