This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"image": "redis:3.2-alpine", | |
"ports": ["6379:6379"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"image": "mongo:3.2", | |
"ports": ["27017:27017"], | |
"volumes": ["${KUDE_CONFIG_HOME}/mongo/data:/data/db"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 0.1 | |
# REQUIRED ENVIRONMENT VARIABLES | |
# AWS_KEY - AWS Access Key ID | |
# AWS_SEC - AWS Secret Access Key | |
# AWS_REG - AWS Default Region (e.g. us-west-2) | |
# AWS_OUT - AWS Output Format (e.g. json) | |
# AWS_PROF - AWS Profile name (e.g. central-account) | |
# IMAGE_REPO_NAME - Name of the image repo (e.g. my-app) | |
# IMAGE_TAG - Tag for the image (e.g. latest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const mongoClient = require('mongodb').MongoClient; | |
const url = 'mongodb://localhost:27017/test'; | |
mongoClient.connect(url) | |
.then(conn => { | |
return conn.collection('restaurants') | |
.find().limit(10).toArray() | |
.then(out => console.log(out)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const Promise = require('bluebird'); | |
const mongoClient = require('mongodb').MongoClient; | |
const url = 'mongodb://localhost:27017/test'; | |
Promise.using(getMongoConnection(url), conn => { | |
return conn.collection('restaurants') | |
.find().limit(10).toArray() | |
.then(out => console.log(out)); |