Chat API server with Golang for Introvesia Workspace
- Golang installed
Install migration tools:
brew install golang-migrateCreate a new migration:
migrate create -ext sql -dir migrations -seq <name>- Uncomment this code at
main.golibs.AutoMigrate()
- Run the server
go list -m all | grep <module>go mod tidyInstall air:
go install github.com/air-verse/air@latestAdd this code after edit profile use command nano ~/.bashrc:
export PATH=$PATH:$(go env GOPATH)/binRun main.go with this command:
air