- Go
- Gorilla Mux
$ go get -u github.com/gorilla/mux
- github.com/gorilla/handlers
$ go get github.com/gorilla/handlers
- GORM:
$ go get -u gorm.io/gorm
$ go get gorm.io/driver/postgres # postgres driver
- Postgres
- PGAdmin
- docker
- go mod init github.com/luciormoraes/go-rest-api
- go mod init go-rest-api
- to start Postgres:
$ docker-compose up
- to access docker:
$ docker exec -it pg_goapi bash
$ hostname -i
or
$ docker inspect id_container | grep IPAddres
- Json, Request, Response and Go. Get returns Json
- adding gorilla mux
- creating routes for our new Endpoints: GET Methods
- change celebrities to Personalities
- running postgres in docker
- GORM installagion
- connection to DB / change controllers to show from DB
- new endpoints to Create, Delete, or Edit a personality
- adding a Header using a middleware: "Content-type", "application/json"
- configuring CORS using 'go get github.com/gorilla/handlers'
- connecting to a react app