Last active
August 22, 2018 05:29
-
-
Save ahawkins/3b78b9b181ad327e7a7c1a473d8a8d0d to your computer and use it in GitHub Desktop.
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
let AWS = require('aws-sdk'); | |
let DB = require('./db'); | |
class Configuration { | |
constructor() { | |
this.bucket = process.env.S3_BUCKET; | |
} | |
get dynamoDBclient() { | |
return new AWS.DynamoDB({ | |
endpoint: process.env.DYNAMODB_URL, | |
region: process.env.AWS_REGION | |
}) | |
} | |
db() { | |
return new DB(this.dynamoDBclient, { | |
users: process.env.DB_USERS_TABLE, | |
information_requests: process.env.DB_INFORMATION_REQUESTS_TABLE | |
}); | |
} | |
} | |
module.exports = new Configuration(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment