This is a simple Go server for handling CRUD operations. It is based on a tutorial by arthur404dev.
- Basic CRUD endpoints for managing data entries.
- RESTful structure using Gin.
- Database integration via GORM.
- Clone the repository:
git clone https://github.com/yourusername/Go_Server.git cd Go_Server - Install dependencies:
go mod tidy
To start the server, you can either:
- Use
airfor live reloading during development:air
- Or, if you prefer to run without live reloading, start the server with:
go run main.go
GET http://localhost:8080/api/v1/openings- List all entriesPOST http://localhost:8080/api/v1/opening- Create a new entryGET http://localhost:8080/api/v1/opening?id={id}- Retrieve a specific entryPUT http://localhost:8080/api/v1/opening?id={id}- Update an entryDELETE http://localhost:8080/api/v1/opening?id={id}- Delete an entry