Notice
														
												
											
												
												
													Recent Posts
													
											
												
												
													Recent Comments
													
											
												
												
													Link
													
											
									| 일 | 월 | 화 | 수 | 목 | 금 | 토 | 
|---|---|---|---|---|---|---|
| 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 | 31 | 
													Tags
													
											
												
												- node.js
- PyQt5
- ubuntu
- MySQL
- 리눅스
- 맛집
- MS-SQL
- swift
- mssql
- GIT
- Linux
- Unity
- 함수
- IOS
- tensorflow
- pandas
- 다이어트
- PyQt
- sqlite
- 날짜
- Excel
- javascript
- flutter
- urllib
- PER
- port
- ASP
- 라즈베리파이
- 유니티
- python
													Archives
													
											
											
											
											목록await (1)
아미(아름다운미소)
			
			
				Node.js mongodb 드라이버 비동기 / 대기 쿼리
				
	
	
               
           
					
					
					
					
					
					
						
					
				const { MongoClient } = require('mongodb') const MONGO_DB = 'mongodb://localhost:27017' let db try { const client = await MongoClient.connect(MONGO_DB, { useNewUrlParser: true }) db = client.db('nodejsdb') console.log("데이타베이스에 연결되었습니다. :" + MONGO_DB); } catch (error) { console.log(` Mongo DB Host not found! please add DB_HOST environment variable to .env file exiting... `) process.exit(1) }
				랭귀지/NodeJS
				
				2020. 5. 2. 22:30