Guest User

Untitled

a guest
Aug 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. let AWS = require('aws-sdk');
  2. let DB = require('./db');
  3.  
  4. class Configuration {
  5. constructor() {
  6. this.bucket = process.env.S3_BUCKET;
  7. }
  8.  
  9. get dynamoDBclient() {
  10. return new AWS.DynamoDB({
  11. endpoint: process.env.DYNAMODB_URL,
  12. region: process.env.AWS_REGION
  13. })
  14. }
  15.  
  16. db() {
  17. return new DB(this.dynamoDBclient, {
  18. users: process.env.DB_USERS_TABLE,
  19. information_requests: process.env.DB_INFORMATION_REQUESTS_TABLE
  20. });
  21. }
  22. }
  23.  
  24. module.exports = new Configuration();
Add Comment
Please, Sign In to add comment