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