In this post we will be replacing the JSON file (for user authentication) with a Postgres database.
add this line to initialize the database in our Application Initialization code below session and about auth:
and replace this line:
with this line, which does the dirty work of using Postgres instead of a JSON file.
We'll also add the initialized database snaplet to our returned App:
We're almost done, but first we'll need to add
_db to our
App definition in
and don't forget the import for postgres in the same file.
We are now using Postgres as a database for our
cabal install and run
abc to make sure
it works. You may need to run the following in
also of note is that the git repo has bumped the version of