-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
db接続しないapi #35
Comments
func ReturnAlterTopPage(c *gin.Context) {
var errs []error
var allVts []domain.Vtuber
var VtsMosWithFav []domain.TransmitMovie
var VtsMosKasWithFav []domain.TransmitKaraoke
allVts = []domain.Vtuber{
{
VtuberId: 1,
VtuberName: "接続確認",
VtuberKana: "sucsessefuly_connect",
IntroMovieUrl: "",
VtuberInputterId: 1,
},
}
VtsMosWithFav = []domain.TransmitMovie{
{
VtuberId: 1,
MovieUrl: "www.youtube.com/watch?v=4p1pIYBU61c",
Vtuber: domain.Vtuber{
VtuberName: "接続確認",
VtuberKana: "sucsessefuly_connect",
IntroMovieUrl: "",
VtuberInputterId: 1,
},
Movie: domain.Movie{
MovieTitle: "牙アピールかわいいおいも[新人vTuber妹望おいも]",
VtuberId: 1,
MovieInputterId: 1,
},
Count: 100,
IsFav: false,
},
}
c.JSON(http.StatusOK, gin.H{
"vtubers": allVts,
"vtubers_movies": VtsMosWithFav,
"vtubers_movies_karaokes": VtsMosKasWithFav,
"error": errs,
"message": "dont you Loged in ?",
})
return
} |
そもそも、これでdb接続失敗しても落ないわ var err error
db, err = gorm.Open(mysql.Open(path), &gorm.Config{})
db = db.Debug()
if err != nil {
// panic("failed to connect database")
}
// migration() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ポートフォリオにてAWSでデプロイを試みている。
app-api間の接続(疎通?)を確認したいが、現状ではapi-dbの接続ができない場合はapiが起動しない。
db接続不要なapiを作成する。
The text was updated successfully, but these errors were encountered: