- Install Node.js
- Install Golang
- Setup a PSQL database
-
Clone github repo
git clone https://github.com/Gonzaga-CPSC-321-Fall-2024/final-project-Frolower.git -
Navigate into the folder
cd final-project-Frolower
-
Navigate into the frontend folder
cd frontend -
Navigate into the React folder
cd ariadne management -
Download dependencies
npm install -
Run
npm startto start the frontend on http://localhost:3000
-
Navigate into the backend folder
cd backend -
Download dependencies
go mod download -
Create a
.envfile with a following structure
DB_USER=your_user
DB_PASSWORD=your_password
DB_HOST=your_host
DB_PORT=your_port
DB_NAME=your_db_name
JWT_SECRET= A string of symbold e.g., sruhguosfeifosjifg -
Navigate into cmd folder
cd cmd -
Run
go run main.goto start the backend app on http://localhost:8080
All required tables are located in backend/migration folder
Currently, the frontend is broken, so postman is highly recommended
-
In postman type
http://localhost:8080/signupto create an account -
In body choose RAW JSON option and create a file with such configuration
and submit it, you will receive JWT you must use to access all other routes
{
"username": "username",
"email": "test@gmail.com",
"first_name": "Name",
"last_name": "Last Name",
"password": "password"
}
-
When testing other routes in Header add
Authorizationkey andJWTas value -
All working routes are located in
main.go