modulepackage
0.0.0-20240202192428-1f5f501a1ad6
Repository: https://github.com/pawelk2012/go-crud.git
Documentation: pkg.go.dev
# README
GO CRUD API
This is an example of simple GO TO DO App build with repository pattern. Fell free to use it as a template for your non prod personal project!
Keywords
- GO Server
- API
- CRUD
- Postgres
- Repository pattern
- Unit test
How to start project
- Install Postgres official image
- Start postgres
podman run --name crud-app-user -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD_CRUDAPP -e POSTGRES_USER=$POSTGRES_USER_CRUDAPP -p 5432:5432 -d postgres
-POSTGRES_USER_CRUDAPP
is admin and DB name. - Start PgAdmin
podman run --name pgadmin-pawel -p 5050:80 -e "PGADMIN_DEFAULT_EMAIL=$POSTGRES_EMAIL" -e "PGADMIN_DEFAULT_PASSWORD=$POSTGRES_PASSWORD_CRUDAPP" -d dpage/pgadmin4
- Get pgAdmin image details
podman inspect idddd \ -f "{{json .NetworkSettings.Networks }}"
- Start service with
make run
command
Test
Exec Make test
in terminal
Code coverage
Exec Make cover
in terminal
TODO
- Add tests
- Finish Postgres CRUD
- Add front end
- Add in memory DB or other DB type
- Build Docker image