-
Install any of the Mongo add-ons available at http://addons.heroku.com
-
Vendor the Mongo driver with your application. You can download it here:
https://github.com/wuputah/heroku-libraries/raw/master/php/mongo/mongo.so
Add it to a folder like "ext".
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
var async_task = function (msg, delay) { | |
var dfd = $.Deferred(); | |
setTimeout( function () { | |
if ( msg !== 'l' ) { | |
dfd.resolve('resolved:' + msg); | |
} | |
else { | |
dfd.reject('rejected:' + msg); | |
} |
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
package main | |
import ( | |
"encoding/json" | |
"io/ioutil" | |
"log" | |
"net/http" | |
) | |
type Message struct { |
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
var AWS = require('aws-sdk'); | |
var Client = require('amazon-api-gateway-client').Client; | |
var RequestLogger = require('stackable-fetcher').RequestLogger; | |
var ResponseLogger = require('stackable-fetcher').ResponseLogger; | |
var client = new Client({ | |
accessKeyId: AWS.config.credentials.accessKeyId, | |
region: 'us-east-1', | |
secretAccessKey: AWS.config.credentials.secretAccessKey, | |
}).use(RequestLogger).use(ResponseLogger); |
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
# Sidekiq interaction and startup script | |
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
mode: "000755" | |
content: | | |
#!/bin/bash | |
. /opt/elasticbeanstalk/hooks/common.sh | |
. /opt/elasticbeanstalk/support/envvars |