readme_content = """
This project is a simple user management system built using Go, GORM, and PostgreSQL for the backend, and React for the frontend.
- Create new users
- View user details
- Delete users
- Store user information in a PostgreSQL database
- Backend: Go, GORM, Gin
- Frontend: React
- Database: PostgreSQL
-
Install Go dependencies:
go get github.com/githubnemo/CompileDaemon go install github.com/githubnemo/CompileDaemon go get github.com/joho/godotenv go get -u github.com/gin-gonic/gin go get -u gorm.io/gorm go get -u gorm.io/driver/postgres go get github.com/jackc/pgx/v5 go get github.com/lib/pq go get github.com/gin-contrib/cors
-
Create a
.env
file in the root directory with the following variables:DB_HOST=localhost DB_PORT=5432 DB_USER=your_db_user DB_PASSWORD=your_db_password DB_NAME=your_db_name
-
Run the Go server:
go run main.go
-
Install Node.js dependencies (in the frontend directory):
npm install
-
Run the React application:
npm start
GET /person
: Retrieve all usersPOST /person
: Create a new userGET /person/:id
: Retrieve user details by IDDELETE /person/:id
: Delete a user by ID
This project is licensed under the MIT License.