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

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

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
```