일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- Linux
- PBKDF2
- Mongo
- instance
- Git
- MEAN stack
- 다중 서버 명령
- Android
- multidex
- memory structure
- API테스트
- elemMatch
- pbkdf2-password
- proguard
- MaridDB
- ssh key
- react-native
- Setup
- node
- window
- centos
- Modulization
- OOP
- Mongoose
- iIntelliJ
- 64k method
- Express
- rest-assured
- event-driven
- Java
- Today
- Total
목록Mongoose (2)
천줄코딩도 한 걸음부터
// mongodb setup var mongoose = require('mongoose'); mongoose.connect('mongodb://localhost/mydb'); var db = mongoose.connection; db.on('error', console.error.bind(console, 'connection error:')); db.once('open', function() { // we're connected! console.log('connected successfully'); }); 다음과 같은 Warning이 발생함(node:1876) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()..
1. npm을 통해 mongoose 모듈 설치 npm install mongoose 2. 자바스크립트 작성 connection-test.jsvar mongoose = require('mongoose'); mongoose.connect('mongodb://localhost/mydb'); var db = mongoose.connection; db.on('error', console.error.bind(console, 'connection error:')); db.once('open', function() { // we're connected! console.log('connected successfully'); }); 3. 실행 node connection-test.js