Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 878 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 878 Bytes

#Go Example Api

This is an example go api for learning purposes.

Installation

  • Clone the repo into the directory where your Go projects live
  • $ git clone https://github.com/[email protected]/go-test-api.git
  • $ cd go-test-api
  • Setup a postgres database
  • Set your ENV vars in .env
    • PORT // port the server should listen on
    • DATABASE_URL // postgres url (e.g postgres://someone@localhost/gotest?sslmode=disable)
  • set the fallback db_url in line 18 - db.go to your db connection
  • Run Server: go run *.go

Packages Used: