GithubHelp home page GithubHelp logo

This is the Haskell MongoDB driver (client). MongoDB is a free, scalable, fast, document database management system. This driver lets you connect to a MongoDB server, and update and query its data. It also lets you do adminstrative tasks, like create an index or look at performance statistics.

Join the chat at https://gitter.im/mongodb-haskell/mongodb Build Status

Documentation

Dev Environment

It's important for this library to be tested with various versions of mongodb server and with different ghc versions. In order to achieve this we use docker containers and docker-compose. This repository contains two files: docker-compose.yml and reattach.sh.

Docker compose file describes two containers.

One container is for running mongodb server. If you want a different version of mongodb server you need to change the tag of mongo image in the docker-compose.yml. In order to start your mongodb server you need to run:

docker-compose up -d mongodb

In order to stop your containers without loosing the data inside of it:

docker-compose stop mongodb

Restart:

docker-compose start mongodb

If you want to remove the mongodb container and start from scratch then:

docker-compose stop mongodb
docker-compose rm mongodb
docker-compose up -d mongodb

The other container is for compiling your code. By specifying the tag of the image you can change the version of ghc you will be using. If you never started this container then you need:

docker-compose run mongodb-haskell

It will start the container and mount your working directory to /opt/mongodb-haskell If you exit the bash cli then the conainer will stop. In order to reattach to an old stopped container you need to run script reattach.sh. If you run docker-compose run again it will create another container and all work made by cabal will be lost. reattach.sh is a workaround for docker-compose's inability to pick up containers that exited.

When you are done with testing you need to run:

docker-compose stop mongodb

Next time you will need to do:

docker-compose start mongodb
reattach.sh

It will start your stopped container with mongodb server and pick up the stopped container with haskell.

mongodb-haskell's Projects

bson icon bson

Haskell representation and serialization of BSON documents (version 1.0) as defined at bsonspec.org

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.