dynamoose
Version:
Dynamoose is a modeling tool for Amazon's DynamoDB (inspired by Mongoose)
19 lines • 394 B
JavaScript
;
const AWS = require("../sdk");
let customDDB;
function main() {
return customDDB || new AWS.DynamoDB();
}
main.set = (ddb) => {
customDDB = ddb;
};
main.revert = () => {
customDDB = undefined;
};
main.local = (endpoint = "http://localhost:8000") => {
main.set(new AWS.DynamoDB({
endpoint
}));
};
module.exports = main;
//# sourceMappingURL=index.js.map