Answer the question
In order to leave comments, you need to log in
How to connect Mongoid?
There is ruby, so far without any frameworks.
require 'mongoid'
Mongoid.load!("mongoid.yml", :development)
class Test
include Mongoid::Document
field :name, type: String
end
development:
clients:
default:
database: mydatabase
hosts:
- localhost:27017
2016-05-01T18:18:23.793+0300 I NETWORK [conn4] end connection 127.0.0.1:38957 (2 connections now open)
mongo
use mydatabase
db.mydatabase.find()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question