Skip to content

anurag-rajawat/rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API

Build CI tests codecov License Go Version Go Report Card

This REST API was built with Golang and the Gin web framework. It is backed by a PostgreSQL database and uses unit tests to ensure its quality.

I built this REST API as a learning project to learn Golang and backend development. I am currently learning Golang and wanted to build something to solidify my understanding of the language.

Prerequisites

  1. Docker
  2. Go

Local Development

Start API server (locally)

$ docker run --rm -d -p 5432:5432 --name=api-db -e POSTGRES_PASSWORD=test postgres:15 
$ make run

Alternatively, using docker compose

$ make docker-run

Run tests

$ make test

API Resources

  • GET /v1
  • GET /v1/users
  • GET /v1/users/{id}
  • PUT v1/users/{id}
  • DELETE v1/users/{id}
  • POST /v1/signup
  • POST /v1/signin

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published