mongo, nodejs æmizchiã§ãã 次ã¯ãã¼ã¿ãã¼ã¹ãæ±ãã¾ãã nodejsã¨npmãæ±ãç°å¢ãæ´ã£ãã§ããããã ã¾ã ã®æ¹ã¯ã2011å¹´æéã®ã¦ã§ãã¢ããªéçºç°å¢ã¯node.js/CoffeeScript/Expressã ï¼ã http://d.hatena.ne.jp/eureka_tech/20110629/1309375362 ãåèã«ç°å¢ãä½ã£ã¦ãã ããã MongoDBã¨ã¯ï¼ -> BSONã¨ããç°¡åãªãã¼ã¿æ§é ã§ãã¼ã¿ãã¼ã¹ãæ§ç¯ã§ãã¾ã ãªãã§SQL使ããªãã®ï¼ -> ãããå¦ç¿ã³ã¹ãé«ããï¼ã MySQLã¨MongoDBã®ããã©ã¼ãã³ã¹ã¯ä¸é·ä¸ç ã ã£ããç°¡åãªæ¹ããï¼ ã¤ãã§ã«è¨ãã°ãMongoDBã§æ±ãBSONã¯æ¡å¼µãããJSONã§ãJSONã¨ã¯ã¤ã¾ãJavascriptã§æ¸ããããã¼ã¿å½¢å¼ãªããã§ããããã¸ãã®ç¸æ§ãããããã§ã MongoDBã®ã¤ã³
Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. const mongoose = require('mongoose'); mongoose.connect('mongodb://127.0.0.1:27017/test'); const Cat = mongoose.model('Cat', { name: String }); const kitty = new Cat({ name: 'Zildjian' }); kitty.save().then(() => console.log('meow'));Mongoose provides a straight-forward, schema
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}