Skip to content

edwinnduti/go-postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postgres and Golang API.

Build Status License: MIT Build GO workflow License: MIT

Requirements:

  • Postgresql
  • Golang
  • Add .env file with values to specified keys:
    HOST=
    DBPORT=
    USER=
    DBNAME=
    PASSWORD=

Run code locally

$ git clone https://github.com/edwinnduti/go-postgres.git 
$ cd go-postgres
$ go mod download
$ go run main.go

Run code using Docker

$ git clone https://github.com/edwinnduti/go-postgres.git 
$ cd go-postgres
$ sudo docker build -t startapp -f Dockerfile .
$ sudo docker run -it -p 8010:8010 startapp

Available :

function path method
Create user /api POST
Get single user /api/{user_id} GET
Get All users /api/users GET
Delete single user /api/user/{user_id} DELETE
update single user /api/user/{user_id} UPDATE

Have a day full of ❤️

About

A SImple REST API using postgresql and golang.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published