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
- 리눅스
- mssql
- node.js
- tensorflow
- 라즈베리파이
- port
- urllib
- python
- IOS
- swift
- PyQt
- sqlite
- PER
- PyQt5
- javascript
- 맛집
- 날짜
- 다이어트
- 유니티
- flutter
- GIT
- Unity
- 함수
- MySQL
- MS-SQL
- Excel
- ASP
- ubuntu
- pandas
- Linux
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