Skip to content

Commit

Permalink
disable mysql by default
Browse files Browse the repository at this point in the history
  • Loading branch information
reindert-vetter committed Sep 6, 2021
1 parent 24f71b7 commit da3b39f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions app/http/controllers/homepage.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@ package controllers
import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation/http/outcome"
"src/resources/views"
)

// Homepage contains the code responsible for generating the home page.
func Homepage(request inter.Request) inter.Response {
db := request.App().Db()
databases := db.Query("SHOW databases;")
if databases.Empty() {

return outcome.Html("Database empty")
}
return outcome.Html("Databases: "+databases.First().String())
return outcome.Html(views.Homepage(request.App(), "Confetti", "Let's be creative!"))
}
4 changes: 2 additions & 2 deletions config/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ package config

import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation/db"
"github.com/confetti-framework/support/env"
"time"
)

var Database = struct {
Expand Down Expand Up @@ -36,6 +34,7 @@ var Database = struct {
*/

Connections: map[string]inter.Connection{
/*
"mysql": &db.MySQL{
Host: env.StringOr("DB_HOST", "127.0.0.1"),
Port: env.IntOr("DB_PORT", 3306),
Expand All @@ -44,6 +43,7 @@ var Database = struct {
Password: env.StringOr("DB_PASSWORD", ""),
QueryTimeout: 10 * time.Second,
},
*/

/*
"postgresql": &db.PostgreSQL{
Expand Down

0 comments on commit da3b39f

Please sign in to comment.