https://github.com/ivalrivall/golang_crud1
simple rest api crud golang with postgresql
https://github.com/ivalrivall/golang_crud1
golang postgresql rest-api
Last synced: 6 months ago
JSON representation
simple rest api crud golang with postgresql
- Host: GitHub
- URL: https://github.com/ivalrivall/golang_crud1
- Owner: ivalrivall
- Created: 2022-07-24T07:52:42.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-30T15:59:09.000Z (almost 4 years ago)
- Last Synced: 2024-11-17T04:12:11.476Z (over 1 year ago)
- Topics: golang, postgresql, rest-api
- Language: Go
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Golang PostgreSQL
This project is simple CRUD application built in golang and using PostgreSQL as DB. Clone for use this project
## Pre-requisite
1. Go/Golang
2. API Tools like Postman / Insomnia / https://hoppscotch.io (need install extension proxy from it)
3. Install and running latest stable docker
4. Copy env
```bash
cp .env.example .env
```
5. Add database dependency by running this command
```bash
docker compose up -d
make migrateup
```
6. Running seeder
```
go run main.go seed BrandSeed ProductSeed CustomerSeed
```
7. Running app
```bash
go run main.go
```
## Cleanup
1. Stop container and deleting
```bash
docker compose down
```
2. Delete image
```bash
docker image rm golang_crud1_postgres
```