Skip to content

fp-in-bo/mongo4s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4b9b0b6 · May 6, 2020

History

11 Commits
May 6, 2020
May 1, 2020
May 1, 2020
May 4, 2020
May 1, 2020
May 3, 2020
May 1, 2020
May 4, 2020
May 4, 2020
May 4, 2020
May 6, 2020
May 1, 2020

Repository files navigation

mongo4s - a functional wrapper on mongo driver

Build Status Maven Central Code of Consuct

Another mongo client for scala?

The purpose of this lib is to fit the gap between the async java driver and cats-effects/fs2. Converting from the driver to fs2 is fairly simple with the usage of fs2.interop.reactivestreams. We believe we can avoid that dependency, saving one indirection.

NB

This is a WIP, everything is likely to change till the design will settle.

Quick Start

To use mongo4s in an existing SBT project with Scala 2.12 or a later version, add the following dependencies to your build.sbt depending on your needs:

libraryDependencies ++= Seq(
  "dev.fpinbo" %% "mongo4s" % "<version>"
)

Local dev

run tests

  • docker-compose up -d
  • sbt test

site

  • build site
docker run \
  -v $PWD:/$PWD \
  -v ~/.sbt:/root/.sbt \
  -v ~/.ivy2:/root/.ivy2 \
  -v ~/.m2:/root/.m2 \
  -v ~/.coursier:/root/.coursier \
  -w /$PWD \
  -it k3vin/sbt-java8-jekyll \
  sbt site/clean site/makeMicrosite
  • run at localhost:4000/mongo4s/
docker run \
  -v $PWD:/$PWD \
  -w /$PWD/site/target/site \
  -p 4000:4000 \
  -it k3vin/sbt-java8-jekyll \
  jekyll serve -b /mongo4s --host 0.0.0.0