Coder Social home page Coder Social logo

ballin-octo-dubstep's Introduction

Setup

Install MongoDb (docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/).

brew update
brew install mongodb

Clone example and load required resources using bundler. Sample application has been configured using instructions on MongoMapper’s Site.

git clone [email protected]:dcvezzani/ballin-octo-dubstep.git mongoapp
cd mongoapp
bundle install

Test

Start MongoDb

./start-db.sh

Run the unit tests. There aren’t any test that exist, but it at least verifies the connection to the database is good.

./run-tests.sh

Start the Rails console

Get your hands dirty. Interact with the database using ActiveRecord like syntax.

Here are some examples to get you started. See MongoMapper::Querying for other querying options.

m = Movie.create!(title: "Tangled")
a = Actor.create!(name: "Joe")

# add actor to the actors for a movie
m.actors << a
m.save!

# search by full field value
m = Movie.where(title: "Tangled").first

# search by "wildcard" (use regular expressions)
m = Movie.where(title: /^Tan/).first

Once you’ve had some time to play around, check out the rest of the great documentation (mongomapper.com/documentation/getting-started/).

begin rdoc

# details on RDoc markup docs.seattlerb.org/rdoc/RDoc/Markup.html

end

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.