aggreact/src-exe/Main.hs
Yann Esposito (Yogsototh) d23918a032
Added slugs in the API
2019-04-13 20:51:06 +02:00

20 lines
865 B
Haskell

import Protolude
import Aggreact (mainServe,Conf(..),AuthorizationStrategy(..))
import Database.Store.Backend.SQLite (DBConf (SQLiteConf))
import Servant.Auth.Server
main :: IO ()
main = do
let conf = Conf { port = 3000
, jwtKeyFilePath = "jwt.key"
, cookieSettings = defaultCookieSettings
{ cookieIsSecure = NotSecure
, cookieXsrfSetting = Nothing
, cookieSameSite = AnySite }
, slugDBConf = SQLiteConf "aggreact.db" "slugs"
, userDBConf = SQLiteConf "aggreact.db" "users"
, commentDBConf = SQLiteConf "aggreact.db" "comments"
, authorizationStrategy = Anybody
}
mainServe conf