Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adamnasrudin03/go-skeleton-fiber

Skeleton project Golang with framework fiber
https://github.com/adamnasrudin03/go-skeleton-fiber

gofiber golang skeleton-template

Last synced: about 1 month ago
JSON representation

Skeleton project Golang with framework fiber

Awesome Lists containing this project

README

        

# go-skeleton-fiber
Skeleton project golang with framework Fiber

## Development Guide

### Collection Using Postman
- ./go-skeleton.postman_collection.json

### Installation
- Clone this repo
```sh
git clone https://github.com/adamnasrudin03/go-skeleton-fiber.git
```

- Copy `.env.example` to `.env`

```sh
cp .env.example .env
```
- Setup local database
- Start service API
```sh
go run main.go
```

### Coverage Unit test
```sh
make cover
```

## Build project by docker
- check ip address in terminal
```sh
ipconfig
```
- change data environment in file ./docker-compose.yml
- build with docker compose
```sh
docker-compose -f "docker-compose.yml" up -d --build
```
- with make file
```sh
make docker-compose
```

## Structure Response RESTfull API
- Error
```json
{
"status": "status error",
"code": 10, // code custom error
"message": {
"id": "message error language Indonesian",
"en": "message error language English"
}
}
```

- Success Single Data
```json
{
"status": "Created",
"data": {}
}
```

- Success Multiple Data
```json
{
"status": "Success",
"meta": {
"page": 1,
"limit": 10,
"total_records": 3,
"total_pages": 1
},
"data": []
}
```

- Success response message
```json
{
"status": "Created",
"message": "data created"
}
```

- Success response Multiple message
```json
{
"status": "Created",
"message": {
"id": "Data berhasil dibuat",
"en": "Data created successfully"
}
}
```



Connect with me:




linkedin logo


blog