diff --git a/src/myWebLog.Data/SetUp.fs b/src/myWebLog.Data/SetUp.fs index da73d9a..eb545ae 100644 --- a/src/myWebLog.Data/SetUp.fs +++ b/src/myWebLog.Data/SetUp.fs @@ -48,7 +48,7 @@ let createIndex cfg table index = |> runResultAsync cfg.conn |> ignore (tbl cfg table).IndexWait(index) - |> runResultAsync cfg.conn + |> runAtomAsync cfg.conn |> ignore logStepDone () @@ -79,7 +79,7 @@ let checkPageIndexes cfg = |> runResultAsync cfg.conn |> ignore (tbl cfg Table.Page).IndexWait "permalink" - |> runResultAsync cfg.conn + |> runAtomAsync cfg.conn |> ignore logStepDone () match idx.Contains "pageList" with @@ -90,7 +90,7 @@ let checkPageIndexes cfg = |> runResultAsync cfg.conn |> ignore (tbl cfg Table.Page).IndexWait "pageList" - |> runResultAsync cfg.conn + |> runAtomAsync cfg.conn |> ignore logStepDone () @@ -104,7 +104,7 @@ let checkPostIndexes cfg = |> runResultAsync cfg.conn |> ignore (tbl cfg Table.Post).IndexWait "webLogAndStatus" - |> runResultAsync cfg.conn + |> runAtomAsync cfg.conn |> ignore logStepDone () match idx.Contains "permalink" with @@ -115,7 +115,7 @@ let checkPostIndexes cfg = |> runResultAsync cfg.conn |> ignore (tbl cfg Table.Post).IndexWait "permalink" - |> runResultAsync cfg.conn + |> runAtomAsync cfg.conn |> ignore logStepDone () @@ -129,7 +129,7 @@ let checkUserIndexes cfg = |> runResultAsync cfg.conn |> ignore (tbl cfg Table.User).IndexWait "logOn" - |> runResultAsync cfg.conn + |> runAtomAsync cfg.conn |> ignore logStepDone () diff --git a/src/myWebLog.Web/App.fs b/src/myWebLog.Web/App.fs index ba2c47c..a00fcf1 100644 --- a/src/myWebLog.Web/App.fs +++ b/src/myWebLog.Web/App.fs @@ -8,6 +8,7 @@ open myWebLog.Entities open Nancy open Nancy.Authentication.Forms open Nancy.Bootstrapper +open Nancy.Conventions open Nancy.Cryptography open Nancy.Owin open Nancy.Security @@ -20,6 +21,7 @@ open RethinkDb.Driver.Net open Suave open Suave.Owin open System +open System.IO open System.Text.RegularExpressions /// Set up a database connection @@ -68,6 +70,16 @@ type MyWebLogBootstrapper() = container.Register() |> ignore + override this.ConfigureConventions (conventions) = + base.ConfigureConventions conventions + // Make theme content available at [theme-name]/ + Directory.EnumerateDirectories "views/themes" + |> Seq.iter (fun dir -> let contentDir = sprintf "views/themes/%s/content" dir + match Directory.Exists contentDir with + | true -> conventions.StaticContentsConventions.Add + (StaticContentConventionBuilder.AddDirectory (dir, contentDir)) + | _ -> ()) + override this.ApplicationStartup (container, pipelines) = base.ApplicationStartup (container, pipelines) // Data configuration (both config and the connection; Nancy modules just need the connection) diff --git a/src/myWebLog/myWebLog.csproj b/src/myWebLog/myWebLog.csproj index f6d928b..ca4b32f 100644 --- a/src/myWebLog/myWebLog.csproj +++ b/src/myWebLog/myWebLog.csproj @@ -48,7 +48,9 @@ - + + Always + @@ -68,22 +70,54 @@ - - - - - - - - - - - - - - - - + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always +