persistent-database-url alternatives and similar packages
Based on the "persistent" category.
Alternatively, view persistent-database-url alternatives based on common mentions on social networks and blogs.
InfluxDB - Power Real-Time Data Analytics at Scale
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of persistent-database-url or a related project?
README
persistent-database-url
Converts the parameters parsed from a database url to the concrete configuration types required by persistent.
Currently, only persistent-postgresql's PostgresConf
is provided.
Installation
cabal install persistent-database-url
Example Usage
Adjusting the Yesod scaffold to run on Heroku:
config/settings.yml
database-url: "_env:DATABASE_URL:postgres://user:pass@localhost:5432/dbname"
database-pool-size: "_env:DB_POOL:5"
Settings.hs:
import Database.Persist.URL (fromDatabaseUrl)
instance FromJSON AppSettings where
parseJSON = withObject "AppSettings" $ \o -> do
appDatabaseConf <- fromDatabaseUrl
<$> o .: "database-pool-size"
<*> o .: "database-url"
-- ...
return AppSettings {..}
How to run tests
stack test