ndrsllwngr / ffp

Minesweepskell - a fun(ctional) Web Minesweeper written in Haskell. Advanced Functional Programming - Group project (2020)
https://www.tcs.ifi.lmu.de/lehre/ss-2020/fun
4 stars 0 forks source link

Switch db to mongo #11

Closed ndrsllwngr closed 4 years ago

ndrsllwngr commented 4 years ago
TODO

fyi

INFO

Diff between mongo and postgres

$ diff -qr ffp test/minesweepskell --exclude=".stack-work" --exclude=".*" | sort
TODO
Files ffp/src/Application.hs and test/minesweepskell/src/Application.hs differ
Files ffp/test/TestImport.hs and test/minesweepskell/test/TestImport.hs differ
DONE
Files ffp/templates/default-layout.hamlet and test/minesweepskell/templates/default-layout.hamlet differ
Files ffp/templates/homepage.hamlet and test/minesweepskell/templates/homepage.hamlet differ
Files ffp/test/Handler/CommentSpec.hs and test/minesweepskell/test/Handler/CommentSpec.hs differ
Files ffp/src/Settings.hs and test/minesweepskell/src/Settings.hs differ
Files ffp/src/Model.hs and test/minesweepskell/src/Model.hs differ
Files ffp/src/Handler/Home.hs and test/minesweepskell/src/Handler/Home.hs differ
Files ffp/src/Handler/Comment.hs and test/minesweepskell/src/Handler/Comment.hs differ
Files ffp/src/Foundation.hs and test/minesweepskell/src/Foundation.hs differ

Files ffp/stack.yaml and test/minesweepskell/stack.yaml differ
Files ffp/stack.yaml.lock and test/minesweepskell/stack.yaml.lock differ
Files ffp/minesweepskell.cabal and test/minesweepskell/minesweepskell.cabal differ
Files ffp/package.yaml and test/minesweepskell/package.yaml differ
Files ffp/config/settings.yml and test/minesweepskell/config/settings.yml differ
Files ffp/config/test-settings.yml and test/minesweepskell/config/test-settings.yml differ

Only in ffp/config: client_session_key.aes

Only in ffp/static: tmp

Only in ffp: minesweepskell.iml
Only in ffp: yesod-devel

Files ffp/README.md and test/minesweepskell/README.md differ
Only in ffp: README-yesodweb-postgres.md

Only in ffp/config: models.persistentmodels
Only in ffp/config: routes.yesodroutes
Only in test/minesweepskell/config: models
Only in test/minesweepskell/config: routes
ndrsllwngr commented 4 years ago

Install MongoDB

  1. Install MongoDB
    brew tap mongodb/brew
    brew install mongodb-community@4.4
  2. Run MongoDB
    brew services start mongodb-community@4.4
    brew services stop mongodb-community@4.4
  3. Verify that it is running ps aux | grep -v grep | grep mongod, logs can be found here /usr/local/var/log/mongodb/mongo.log. and settings here /usr/local/etc/mongod.conf

For more information take a look at https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/

Use MongoDB Compass as GUI

Use DataGrip as GUI