Skip to content

Instantly share code, notes, and snippets.

@ahawkins
Last active August 22, 2018 05:29
Show Gist options
  • Save ahawkins/3b78b9b181ad327e7a7c1a473d8a8d0d to your computer and use it in GitHub Desktop.
Save ahawkins/3b78b9b181ad327e7a7c1a473d8a8d0d to your computer and use it in GitHub Desktop.
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