Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. More info: https://golang.org
It's easy to get started.
Install Go and set GOPATH
variable with simply follow the instruction from the video here.
Move the project to your workspace (i.e. golang/github.com/noorelbahr
).
Then open terminal and move to the project directory
cd $GOPATH/github.com/{username}/golearn
Open the project with your code editor and don't forget to download all dependencies :
go get github.com/gorilla/mux
go get github.com/jinzhu/gorm
go get github.com/satori/go.uuid
go get github.com/dgrijalva/jwt-go
go get github.com/joho/godotenv
go get golang.org/x/crypto/bcrypt
Simply run :
make dev
Or
go run main.go
It will run initial migration for users
table and add one default user, use the credential below to hit our login endpoint:
fullname: John Doe
username: johndoe
password: 123123
We can check our localhost
on port 8082
(http://localhost:8082)
To test our API, click button bellow :
The Postman Collection will be updated periodically
depends on any changes made to the project.
If you want to get a latest collection, just click on the Run
button above and import it as a copy to your Postman App.
You always can do it whenever you want to check for a latest collection. ;)