Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
65 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
module Config.Database ( | ||
databaseConnection, | ||
ormAdapter | ||
) where | ||
|
||
import System.Log.Logger | ||
|
||
-- Your favorite HDBC driver | ||
import Database.HDBC.PostgreSQL | ||
import Database.HDBC.ODBC | ||
import qualified Turbinado.Database.ORM.Adapters.MySQL as M | ||
|
||
import Turbinado.Environment.Types | ||
---------------------------------------------------------------- | ||
-- Database connection | ||
---------------------------------------------------------------- | ||
-- databaseConnection :: Maybe (IO Connection) | ||
-- databaseConnection = Nothing | ||
databaseConnection = Just $ connectPostgreSQL "host=localhost dbname=turbinado user=turbinado password=turbinado" | ||
|
||
|
||
ormAdapter = M.ormAdapter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,41 @@ | ||
module Config.Routes where | ||
|
||
routes = [ "/:controller/:action/:id" | ||
-- | ||
-- Import modules for which you'll be creating static routes. | ||
-- | ||
-- e.g. | ||
-- import App.Layouts.Default | ||
-- import App.Controllers.Home | ||
-- import App.Controllers.Develop | ||
-- import App.Views.Home.Index | ||
-- import App.Views.Develop.Index | ||
|
||
-- | ||
-- Configure dynamic routes for on-the-fly compiled-and-loaded | ||
-- modules (ala Rails) | ||
-- | ||
routes = [ "/:controller/:action/:id.:format" | ||
, "/:controller/:action/:id" | ||
, "/:controller/:action.:format" | ||
, "/:controller/:action" | ||
, "/:controller" | ||
, "/home" | ||
] | ||
|
||
-- | ||
-- Statically compile and load these Layouts, Controllers and Views | ||
-- | ||
staticLayouts = | ||
[ | ||
-- ("App/Layouts/Default.hs", "markup", App.Layouts.Default.markup) | ||
] | ||
|
||
staticControllers = | ||
[ | ||
--("App/Controllers/Home.hs", "index", App.Controllers.Home.index) | ||
] | ||
|
||
staticViews = | ||
[ | ||
-- ("App/Views/Develop/Index.hs", "markup", App.Views.Develop.Index.markup) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,4 +141,3 @@ Library | |
Turbinado.View.Helpers.Tags | ||
Turbinado.View.Monad | ||
|
||
|