#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 onDATABASE_URL
// postgres url (e.g postgres://someone@localhost/gotest?sslmode=disable)
- set the fallback
db_url
inline 18 - db.go
to your db connection - Run Server:
go run *.go
Packages Used: