Scaffolding update
This commit is contained in:
parent
b8a73d9b7f
commit
398abb0ade
@ -5,6 +5,7 @@
|
|||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
static/tmp/
|
static/tmp/
|
||||||
|
static/combined/
|
||||||
config/client_session_key.aes
|
config/client_session_key.aes
|
||||||
*.hi
|
*.hi
|
||||||
*.o
|
*.o
|
||||||
@ -15,6 +16,7 @@ yesod-devel/
|
|||||||
.cabal-sandbox
|
.cabal-sandbox
|
||||||
cabal.sandbox.config
|
cabal.sandbox.config
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
*.swp
|
||||||
|
|
||||||
{-# START_FILE Application.hs #-}
|
{-# START_FILE Application.hs #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
@ -37,7 +39,7 @@ import qualified Network.Wai.Middleware.RequestLogger as RequestLogger
|
|||||||
import qualified Database.Persist
|
import qualified Database.Persist
|
||||||
import Network.HTTP.Client.Conduit (newManager)
|
import Network.HTTP.Client.Conduit (newManager)
|
||||||
import Control.Concurrent (forkIO, threadDelay)
|
import Control.Concurrent (forkIO, threadDelay)
|
||||||
import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize)
|
import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize, flushLogStr)
|
||||||
import Network.Wai.Logger (clockDateCacher)
|
import Network.Wai.Logger (clockDateCacher)
|
||||||
import Data.Default (def)
|
import Data.Default (def)
|
||||||
import Yesod.Core.Types (loggerSet, Logger (Logger))
|
import Yesod.Core.Types (loggerSet, Logger (Logger))
|
||||||
@ -71,7 +73,7 @@ makeApplication conf = do
|
|||||||
-- Create the WAI application and apply middlewares
|
-- Create the WAI application and apply middlewares
|
||||||
app <- toWaiAppPlain foundation
|
app <- toWaiAppPlain foundation
|
||||||
let logFunc = messageLoggerSource foundation (appLogger foundation)
|
let logFunc = messageLoggerSource foundation (appLogger foundation)
|
||||||
return (logWare app, logFunc)
|
return (logWare $ defaultMiddlewaresNoLogging app, logFunc)
|
||||||
|
|
||||||
-- | Loads up any necessary settings, creates your foundation datatype, and
|
-- | Loads up any necessary settings, creates your foundation datatype, and
|
||||||
-- performs some initialization.
|
-- performs some initialization.
|
||||||
@ -94,6 +96,7 @@ makeFoundation conf = do
|
|||||||
let updateLoop = do
|
let updateLoop = do
|
||||||
threadDelay 1000000
|
threadDelay 1000000
|
||||||
updater
|
updater
|
||||||
|
flushLogStr loggerSet'
|
||||||
updateLoop
|
updateLoop
|
||||||
_ <- forkIO updateLoop
|
_ <- forkIO updateLoop
|
||||||
|
|
||||||
@ -407,7 +410,7 @@ library
|
|||||||
|
|
||||||
build-depends: base >= 4 && < 5
|
build-depends: base >= 4 && < 5
|
||||||
, yesod >= 1.2.5 && < 1.3
|
, yesod >= 1.2.5 && < 1.3
|
||||||
, yesod-core >= 1.2 && < 1.3
|
, yesod-core >= 1.2.12 && < 1.3
|
||||||
, yesod-auth >= 1.3 && < 1.4
|
, yesod-auth >= 1.3 && < 1.4
|
||||||
, yesod-static >= 1.2 && < 1.3
|
, yesod-static >= 1.2 && < 1.3
|
||||||
, yesod-form >= 1.3 && < 1.4
|
, yesod-form >= 1.3 && < 1.4
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
static/tmp/
|
static/tmp/
|
||||||
|
static/combined/
|
||||||
config/client_session_key.aes
|
config/client_session_key.aes
|
||||||
*.hi
|
*.hi
|
||||||
*.o
|
*.o
|
||||||
@ -15,6 +16,7 @@ yesod-devel/
|
|||||||
.cabal-sandbox
|
.cabal-sandbox
|
||||||
cabal.sandbox.config
|
cabal.sandbox.config
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
*.swp
|
||||||
|
|
||||||
{-# START_FILE Application.hs #-}
|
{-# START_FILE Application.hs #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
@ -39,7 +41,7 @@ import Database.Persist.Sql (runMigration)
|
|||||||
import Network.HTTP.Client.Conduit (newManager)
|
import Network.HTTP.Client.Conduit (newManager)
|
||||||
import Control.Monad.Logger (runLoggingT)
|
import Control.Monad.Logger (runLoggingT)
|
||||||
import Control.Concurrent (forkIO, threadDelay)
|
import Control.Concurrent (forkIO, threadDelay)
|
||||||
import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize)
|
import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize, flushLogStr)
|
||||||
import Network.Wai.Logger (clockDateCacher)
|
import Network.Wai.Logger (clockDateCacher)
|
||||||
import Data.Default (def)
|
import Data.Default (def)
|
||||||
import Yesod.Core.Types (loggerSet, Logger (Logger))
|
import Yesod.Core.Types (loggerSet, Logger (Logger))
|
||||||
@ -73,7 +75,7 @@ makeApplication conf = do
|
|||||||
-- Create the WAI application and apply middlewares
|
-- Create the WAI application and apply middlewares
|
||||||
app <- toWaiAppPlain foundation
|
app <- toWaiAppPlain foundation
|
||||||
let logFunc = messageLoggerSource foundation (appLogger foundation)
|
let logFunc = messageLoggerSource foundation (appLogger foundation)
|
||||||
return (logWare app, logFunc)
|
return (logWare $ defaultMiddlewaresNoLogging app, logFunc)
|
||||||
|
|
||||||
-- | Loads up any necessary settings, creates your foundation datatype, and
|
-- | Loads up any necessary settings, creates your foundation datatype, and
|
||||||
-- performs some initialization.
|
-- performs some initialization.
|
||||||
@ -96,6 +98,7 @@ makeFoundation conf = do
|
|||||||
let updateLoop = do
|
let updateLoop = do
|
||||||
threadDelay 1000000
|
threadDelay 1000000
|
||||||
updater
|
updater
|
||||||
|
flushLogStr loggerSet'
|
||||||
updateLoop
|
updateLoop
|
||||||
_ <- forkIO updateLoop
|
_ <- forkIO updateLoop
|
||||||
|
|
||||||
@ -411,7 +414,7 @@ library
|
|||||||
|
|
||||||
build-depends: base >= 4 && < 5
|
build-depends: base >= 4 && < 5
|
||||||
, yesod >= 1.2.5 && < 1.3
|
, yesod >= 1.2.5 && < 1.3
|
||||||
, yesod-core >= 1.2 && < 1.3
|
, yesod-core >= 1.2.12 && < 1.3
|
||||||
, yesod-auth >= 1.3 && < 1.4
|
, yesod-auth >= 1.3 && < 1.4
|
||||||
, yesod-static >= 1.2 && < 1.3
|
, yesod-static >= 1.2 && < 1.3
|
||||||
, yesod-form >= 1.3 && < 1.4
|
, yesod-form >= 1.3 && < 1.4
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
static/tmp/
|
static/tmp/
|
||||||
|
static/combined/
|
||||||
config/client_session_key.aes
|
config/client_session_key.aes
|
||||||
*.hi
|
*.hi
|
||||||
*.o
|
*.o
|
||||||
@ -16,6 +17,7 @@ yesod-devel/
|
|||||||
.cabal-sandbox
|
.cabal-sandbox
|
||||||
cabal.sandbox.config
|
cabal.sandbox.config
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
*.swp
|
||||||
|
|
||||||
{-# START_FILE Application.hs #-}
|
{-# START_FILE Application.hs #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
@ -41,7 +43,7 @@ import Network.HTTP.Client.Conduit (newManager)
|
|||||||
import Yesod.Fay (getFaySite)
|
import Yesod.Fay (getFaySite)
|
||||||
import Control.Monad.Logger (runLoggingT)
|
import Control.Monad.Logger (runLoggingT)
|
||||||
import Control.Concurrent (forkIO, threadDelay)
|
import Control.Concurrent (forkIO, threadDelay)
|
||||||
import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize)
|
import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize, flushLogStr)
|
||||||
import Network.Wai.Logger (clockDateCacher)
|
import Network.Wai.Logger (clockDateCacher)
|
||||||
import Data.Default (def)
|
import Data.Default (def)
|
||||||
import Yesod.Core.Types (loggerSet, Logger (Logger))
|
import Yesod.Core.Types (loggerSet, Logger (Logger))
|
||||||
@ -76,7 +78,7 @@ makeApplication conf = do
|
|||||||
-- Create the WAI application and apply middlewares
|
-- Create the WAI application and apply middlewares
|
||||||
app <- toWaiAppPlain foundation
|
app <- toWaiAppPlain foundation
|
||||||
let logFunc = messageLoggerSource foundation (appLogger foundation)
|
let logFunc = messageLoggerSource foundation (appLogger foundation)
|
||||||
return (logWare app, logFunc)
|
return (logWare $ defaultMiddlewaresNoLogging app, logFunc)
|
||||||
|
|
||||||
-- | Loads up any necessary settings, creates your foundation datatype, and
|
-- | Loads up any necessary settings, creates your foundation datatype, and
|
||||||
-- performs some initialization.
|
-- performs some initialization.
|
||||||
@ -99,6 +101,7 @@ makeFoundation conf = do
|
|||||||
let updateLoop = do
|
let updateLoop = do
|
||||||
threadDelay 1000000
|
threadDelay 1000000
|
||||||
updater
|
updater
|
||||||
|
flushLogStr loggerSet'
|
||||||
updateLoop
|
updateLoop
|
||||||
_ <- forkIO updateLoop
|
_ <- forkIO updateLoop
|
||||||
|
|
||||||
@ -447,7 +450,7 @@ library
|
|||||||
|
|
||||||
build-depends: base >= 4 && < 5
|
build-depends: base >= 4 && < 5
|
||||||
, yesod >= 1.2.5 && < 1.3
|
, yesod >= 1.2.5 && < 1.3
|
||||||
, yesod-core >= 1.2 && < 1.3
|
, yesod-core >= 1.2.12 && < 1.3
|
||||||
, yesod-auth >= 1.3 && < 1.4
|
, yesod-auth >= 1.3 && < 1.4
|
||||||
, yesod-static >= 1.2 && < 1.3
|
, yesod-static >= 1.2 && < 1.3
|
||||||
, yesod-form >= 1.3 && < 1.4
|
, yesod-form >= 1.3 && < 1.4
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
static/tmp/
|
static/tmp/
|
||||||
|
static/combined/
|
||||||
config/client_session_key.aes
|
config/client_session_key.aes
|
||||||
*.hi
|
*.hi
|
||||||
*.o
|
*.o
|
||||||
@ -15,6 +16,7 @@ yesod-devel/
|
|||||||
.cabal-sandbox
|
.cabal-sandbox
|
||||||
cabal.sandbox.config
|
cabal.sandbox.config
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
*.swp
|
||||||
|
|
||||||
{-# START_FILE Application.hs #-}
|
{-# START_FILE Application.hs #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
@ -39,7 +41,7 @@ import Database.Persist.Sql (runMigration)
|
|||||||
import Network.HTTP.Client.Conduit (newManager)
|
import Network.HTTP.Client.Conduit (newManager)
|
||||||
import Control.Monad.Logger (runLoggingT)
|
import Control.Monad.Logger (runLoggingT)
|
||||||
import Control.Concurrent (forkIO, threadDelay)
|
import Control.Concurrent (forkIO, threadDelay)
|
||||||
import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize)
|
import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize, flushLogStr)
|
||||||
import Network.Wai.Logger (clockDateCacher)
|
import Network.Wai.Logger (clockDateCacher)
|
||||||
import Data.Default (def)
|
import Data.Default (def)
|
||||||
import Yesod.Core.Types (loggerSet, Logger (Logger))
|
import Yesod.Core.Types (loggerSet, Logger (Logger))
|
||||||
@ -73,7 +75,7 @@ makeApplication conf = do
|
|||||||
-- Create the WAI application and apply middlewares
|
-- Create the WAI application and apply middlewares
|
||||||
app <- toWaiAppPlain foundation
|
app <- toWaiAppPlain foundation
|
||||||
let logFunc = messageLoggerSource foundation (appLogger foundation)
|
let logFunc = messageLoggerSource foundation (appLogger foundation)
|
||||||
return (logWare app, logFunc)
|
return (logWare $ defaultMiddlewaresNoLogging app, logFunc)
|
||||||
|
|
||||||
-- | Loads up any necessary settings, creates your foundation datatype, and
|
-- | Loads up any necessary settings, creates your foundation datatype, and
|
||||||
-- performs some initialization.
|
-- performs some initialization.
|
||||||
@ -96,6 +98,7 @@ makeFoundation conf = do
|
|||||||
let updateLoop = do
|
let updateLoop = do
|
||||||
threadDelay 1000000
|
threadDelay 1000000
|
||||||
updater
|
updater
|
||||||
|
flushLogStr loggerSet'
|
||||||
updateLoop
|
updateLoop
|
||||||
_ <- forkIO updateLoop
|
_ <- forkIO updateLoop
|
||||||
|
|
||||||
@ -411,7 +414,7 @@ library
|
|||||||
|
|
||||||
build-depends: base >= 4 && < 5
|
build-depends: base >= 4 && < 5
|
||||||
, yesod >= 1.2.5 && < 1.3
|
, yesod >= 1.2.5 && < 1.3
|
||||||
, yesod-core >= 1.2 && < 1.3
|
, yesod-core >= 1.2.12 && < 1.3
|
||||||
, yesod-auth >= 1.3 && < 1.4
|
, yesod-auth >= 1.3 && < 1.4
|
||||||
, yesod-static >= 1.2 && < 1.3
|
, yesod-static >= 1.2 && < 1.3
|
||||||
, yesod-form >= 1.3 && < 1.4
|
, yesod-form >= 1.3 && < 1.4
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
static/tmp/
|
static/tmp/
|
||||||
|
static/combined/
|
||||||
config/client_session_key.aes
|
config/client_session_key.aes
|
||||||
*.hi
|
*.hi
|
||||||
*.o
|
*.o
|
||||||
@ -15,6 +16,7 @@ yesod-devel/
|
|||||||
.cabal-sandbox
|
.cabal-sandbox
|
||||||
cabal.sandbox.config
|
cabal.sandbox.config
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
*.swp
|
||||||
|
|
||||||
{-# START_FILE Application.hs #-}
|
{-# START_FILE Application.hs #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
@ -34,7 +36,7 @@ import Network.Wai.Middleware.RequestLogger
|
|||||||
import qualified Network.Wai.Middleware.RequestLogger as RequestLogger
|
import qualified Network.Wai.Middleware.RequestLogger as RequestLogger
|
||||||
import Network.HTTP.Client.Conduit (newManager)
|
import Network.HTTP.Client.Conduit (newManager)
|
||||||
import Control.Concurrent (forkIO, threadDelay)
|
import Control.Concurrent (forkIO, threadDelay)
|
||||||
import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize)
|
import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize, flushLogStr)
|
||||||
import Network.Wai.Logger (clockDateCacher)
|
import Network.Wai.Logger (clockDateCacher)
|
||||||
import Data.Default (def)
|
import Data.Default (def)
|
||||||
import Yesod.Core.Types (loggerSet, Logger (Logger))
|
import Yesod.Core.Types (loggerSet, Logger (Logger))
|
||||||
@ -68,7 +70,7 @@ makeApplication conf = do
|
|||||||
-- Create the WAI application and apply middlewares
|
-- Create the WAI application and apply middlewares
|
||||||
app <- toWaiAppPlain foundation
|
app <- toWaiAppPlain foundation
|
||||||
let logFunc = messageLoggerSource foundation (appLogger foundation)
|
let logFunc = messageLoggerSource foundation (appLogger foundation)
|
||||||
return (logWare app, logFunc)
|
return (logWare $ defaultMiddlewaresNoLogging app, logFunc)
|
||||||
|
|
||||||
-- | Loads up any necessary settings, creates your foundation datatype, and
|
-- | Loads up any necessary settings, creates your foundation datatype, and
|
||||||
-- performs some initialization.
|
-- performs some initialization.
|
||||||
@ -87,6 +89,7 @@ makeFoundation conf = do
|
|||||||
let updateLoop = do
|
let updateLoop = do
|
||||||
threadDelay 1000000
|
threadDelay 1000000
|
||||||
updater
|
updater
|
||||||
|
flushLogStr loggerSet'
|
||||||
updateLoop
|
updateLoop
|
||||||
_ <- forkIO updateLoop
|
_ <- forkIO updateLoop
|
||||||
|
|
||||||
@ -338,7 +341,7 @@ library
|
|||||||
|
|
||||||
build-depends: base >= 4 && < 5
|
build-depends: base >= 4 && < 5
|
||||||
, yesod >= 1.2.5 && < 1.3
|
, yesod >= 1.2.5 && < 1.3
|
||||||
, yesod-core >= 1.2 && < 1.3
|
, yesod-core >= 1.2.12 && < 1.3
|
||||||
, yesod-auth >= 1.3 && < 1.4
|
, yesod-auth >= 1.3 && < 1.4
|
||||||
, yesod-static >= 1.2 && < 1.3
|
, yesod-static >= 1.2 && < 1.3
|
||||||
, yesod-form >= 1.3 && < 1.4
|
, yesod-form >= 1.3 && < 1.4
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
{-# START_FILE .gitignore #-}
|
{-# START_FILE .gitignore #-}
|
||||||
dist*
|
dist*
|
||||||
static/tmp/
|
static/tmp/
|
||||||
|
static/combined/
|
||||||
config/client_session_key.aes
|
config/client_session_key.aes
|
||||||
*.hi
|
*.hi
|
||||||
*.o
|
*.o
|
||||||
@ -15,6 +16,7 @@ yesod-devel/
|
|||||||
.cabal-sandbox
|
.cabal-sandbox
|
||||||
cabal.sandbox.config
|
cabal.sandbox.config
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
*.swp
|
||||||
|
|
||||||
{-# START_FILE Application.hs #-}
|
{-# START_FILE Application.hs #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
@ -39,7 +41,7 @@ import Database.Persist.Sql (runMigration)
|
|||||||
import Network.HTTP.Client.Conduit (newManager)
|
import Network.HTTP.Client.Conduit (newManager)
|
||||||
import Control.Monad.Logger (runLoggingT)
|
import Control.Monad.Logger (runLoggingT)
|
||||||
import Control.Concurrent (forkIO, threadDelay)
|
import Control.Concurrent (forkIO, threadDelay)
|
||||||
import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize)
|
import System.Log.FastLogger (newStdoutLoggerSet, defaultBufSize, flushLogStr)
|
||||||
import Network.Wai.Logger (clockDateCacher)
|
import Network.Wai.Logger (clockDateCacher)
|
||||||
import Data.Default (def)
|
import Data.Default (def)
|
||||||
import Yesod.Core.Types (loggerSet, Logger (Logger))
|
import Yesod.Core.Types (loggerSet, Logger (Logger))
|
||||||
@ -73,7 +75,7 @@ makeApplication conf = do
|
|||||||
-- Create the WAI application and apply middlewares
|
-- Create the WAI application and apply middlewares
|
||||||
app <- toWaiAppPlain foundation
|
app <- toWaiAppPlain foundation
|
||||||
let logFunc = messageLoggerSource foundation (appLogger foundation)
|
let logFunc = messageLoggerSource foundation (appLogger foundation)
|
||||||
return (logWare app, logFunc)
|
return (logWare $ defaultMiddlewaresNoLogging app, logFunc)
|
||||||
|
|
||||||
-- | Loads up any necessary settings, creates your foundation datatype, and
|
-- | Loads up any necessary settings, creates your foundation datatype, and
|
||||||
-- performs some initialization.
|
-- performs some initialization.
|
||||||
@ -96,6 +98,7 @@ makeFoundation conf = do
|
|||||||
let updateLoop = do
|
let updateLoop = do
|
||||||
threadDelay 1000000
|
threadDelay 1000000
|
||||||
updater
|
updater
|
||||||
|
flushLogStr loggerSet'
|
||||||
updateLoop
|
updateLoop
|
||||||
_ <- forkIO updateLoop
|
_ <- forkIO updateLoop
|
||||||
|
|
||||||
@ -411,7 +414,7 @@ library
|
|||||||
|
|
||||||
build-depends: base >= 4 && < 5
|
build-depends: base >= 4 && < 5
|
||||||
, yesod >= 1.2.5 && < 1.3
|
, yesod >= 1.2.5 && < 1.3
|
||||||
, yesod-core >= 1.2 && < 1.3
|
, yesod-core >= 1.2.12 && < 1.3
|
||||||
, yesod-auth >= 1.3 && < 1.4
|
, yesod-auth >= 1.3 && < 1.4
|
||||||
, yesod-static >= 1.2 && < 1.3
|
, yesod-static >= 1.2 && < 1.3
|
||||||
, yesod-form >= 1.3 && < 1.4
|
, yesod-form >= 1.3 && < 1.4
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user