Skip to content

katsun0921/portfolio_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

portfolio_api

Portfolio API created with Golang.

DATABASE

今回データベース構築はmigrateでcliで実行しています。

https://github.com/golang-migrate/migrate/tree/master/cmd/migrate

CLI

Linux

curl -L https://github.com/golang-migrate/migrate/releases/download/$version/migrate.$platform-amd64.tar.gz | tar xvz

MacOS(Homebrewを使用)

brew install golang-migrate

Moduleをinstall。今回はmysqlを使用

go get -tags 'mysql' -u github.com/golang-migrate/migrate/cmd/migrate

MySQL

https://github.com/golang-migrate/migrate/tree/master/database/mysql

Run

migrate -source file://migrations/ -database 'mysql://root:@tcp(127.0.0.1:3306)/blog_db' up 1

About

Portfolio API created with Golang.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published