Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heliolj/golang-rest-api-personalities
Golang RESTful CRUD API built with Go and PostgreSQL
https://github.com/heliolj/golang-rest-api-personalities
crud docker go golang gorilla-mux postgresql rest-api
Last synced: about 2 months ago
JSON representation
Golang RESTful CRUD API built with Go and PostgreSQL
- Host: GitHub
- URL: https://github.com/heliolj/golang-rest-api-personalities
- Owner: helioLJ
- Created: 2024-03-14T22:21:06.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-18T11:26:34.000Z (10 months ago)
- Last Synced: 2024-03-18T12:25:44.554Z (10 months ago)
- Topics: crud, docker, go, golang, gorilla-mux, postgresql, rest-api
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Golang REST API Personalities
This is a RESTful API built with Go. It provides CRUD operations for managing "personalidades".## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.### Prerequisites
- Go 1.21.3 or later
- Docker
### Installing
1. Clone the repository:
```bash
git clone https://github.com/helioLJ/golang-rest-api-personalities.git
```
2. Navigate to the project directory:
```bash
cd golang-rest-api-personalities
```
3. Install the dependencies:
```bash
go mod download
```
4. Run the application:
```bash
go run main.go
```
The server will start on `localhost:8080`.## API Endpoints
- `GET /api/personalidades`: Fetch all personalidades
- `GET /api/personalidades/{id}`: Fetch a single personalidade by ID
- `POST /api/personalidades`: Create a new personalidade
- `DELETE /api/personalidades/{id}`: Delete a personalidade by ID
- `PUT /api/personalidades/{id}`: Update a personalidade by ID
## Built With
- Go - The programming language used
- Gorilla Mux - The HTTP router and URL matcher for building Go web servers
- PostgreSQL - The database used