Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 796 Bytes

File metadata and controls

31 lines (21 loc) · 796 Bytes

GoLang Blog Backend

Setup

If new to Golang, follow tutorial to setup and run GO provided on main doc page. It's documentation is fine

Once installed, add export PATH=$PATH:/usr/local/go/bin in the end of ~/.profile and reboot.

For a new project

mkdir projectName
cd projectName
go mod init projectName

New dependencies

To use dependencies, as for example google uuid must update go.mod by using following command

go get -u github.com/google/uuid
go get -u github.com/joho/godotenv
go get -u golang.org/x/crypto
go get -u github.com/go-sql-driver/mysql
go get -u github.com/golang-jwt/jwt/v5

When clone and build docker image

Run go mod tidy on root api directory to generate go.sum file needed to build docker image