1.2.0 • Published 4 years ago
@bgcbrasil/dynamodb-operations v1.2.0
@bgcbrasil/dynamodb-operations
What is this repository for?
- Run seeds in Dynamodb Databases
How to use it
- First, you must create the following file:
// Path 'config/dynamodbConfig.js'
// eslint-disable-next-line import/no-extraneous-dependencies
const { env } = require("minimist")(process.argv.slice(2));
async function loadGlobalReplacements() {
return {};
}
async function getConfigs() {
return {
globalReplacements: await loadGlobalReplacements(),
serviceName: "bgc-information-checker",
env,
};
}
module.exports = getConfigs;Then, you can create a .js or .json file
.json
{ "id": "any-id", ...rest }or
[ { "id": "any-id", ...rest } ].js
module.exports = { id: "any-id", ...rest, };or
module.exports = [ { id: "any-id", ...rest, }, ];You should be able to run the CLI with:
npx -p @bgcbrasil/dynamodb-operations <command> --env <'dev'|'staging'|'production'>
| Command | Description |
|---|---|
| seed | Run all seeds |
1.2.0
4 years ago
1.1.0
4 years ago
1.1.0-beta.1
4 years ago
1.2.0-beta.1
4 years ago
1.0.0
4 years ago
1.1.0-dev.1
4 years ago