var Mongolian = require("mongolian");
var server = new Mongolian;

var db = server.db("test"); // test Database선택
var posts = db.collection("posts"); //posts Collection 선택

//posts Collection 에  Document 넣기
posts.insert({
    pageId: "hallo",
    title: "Hallo",
    created: new Date,
    body: "Welcome to my new blog!"
});

'mongodb' 카테고리의 다른 글

버전확인  (0) 2012.03.16
설치  (0) 2012.03.16
명령어  (0) 2012.03.16
함수기능확인  (0) 2012.02.14
mongodb  (0) 2012.02.01

+ Recent posts