Simple CRUD APIS for Books using POSTGRES SQL and Gorilla Mux
- Clone the repository
go get github.com/subosito/gotenv
go get github.com/gorilla/mux
go get github.com/lib/pq
- Create account on Elephant Sql.
- Create db Instance on above url.
- Copy the
database url
which will be in the formatpostgres://user:password@server:PORT/user
. - Create
.env
file locally in the root directory. - Add
SQL_URL=database url
in the file.
go run main.go
- Open Postman
- Import
book-list.postman_collection.json
- Enjoy