Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adamnasrudin03/go-skeleton-chi
Skeleton project Golang with framework chi
https://github.com/adamnasrudin03/go-skeleton-chi
golang skeleton-template
Last synced: about 1 month ago
JSON representation
Skeleton project Golang with framework chi
- Host: GitHub
- URL: https://github.com/adamnasrudin03/go-skeleton-chi
- Owner: adamnasrudin03
- License: mit
- Created: 2024-07-23T03:52:36.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-08-16T13:22:06.000Z (3 months ago)
- Last Synced: 2024-10-02T09:11:22.923Z (about 2 months ago)
- Topics: golang, skeleton-template
- Language: Go
- Homepage: https://adamnasrudin.vercel.app/blog/skeleton-project-golang
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-skeleton-chi
Skeleton project golang with framework go-chi / Chi## Development Guide
### Collection Using Postman
- ./go-skeleton.postman_collection.json
### Installation
- Clone this repo
```sh
git clone https://github.com/adamnasrudin03/go-skeleton-chi.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: