Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stacksjs/dynamodb-tooling
A simple local DynamoDB API. Without the need for Docker.
https://github.com/stacksjs/dynamodb-tooling
automation bun dynamodb local setup single-table-design typescript
Last synced: 3 months ago
JSON representation
A simple local DynamoDB API. Without the need for Docker.
- Host: GitHub
- URL: https://github.com/stacksjs/dynamodb-tooling
- Owner: stacksjs
- License: mit
- Created: 2024-03-17T05:01:21.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-22T11:16:05.000Z (7 months ago)
- Last Synced: 2024-05-22T23:37:15.057Z (7 months ago)
- Topics: automation, bun, dynamodb, local, setup, single-table-design, typescript
- Language: TypeScript
- Homepage:
- Size: 511 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
![Social Card of this repo](.github/art/cover.png)
# DynamoDB Goodies
[![npm version][npm-version-src]][npm-version-href]
[![GitHub Actions][github-actions-src]][github-actions-href]
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)## Features
- Zero-config DynamoDB setup
- Local development with SSL support (wip)
- DynamoDB Toolbox integration## Install
```bash
bun install -d dynamodb-tooling
```## Get Started
Getting started with the DynamoDB Tooling is easy. Just import `dynamoDb` and get going:
```ts
import { dynamoDb } from 'dynamodb-tooling'interface LaunchOptions {
port: number
dbPath?: string
additionalArgs?: string[]
verbose?: boolean
detached?: boolean
javaOpts?: string
}const childProcess = await dynamoDb.launch(options)
dynamoDb.stopChild(childProcess)
dynamoDb.stop(options.port)
dynamoDb.relaunch()dynamoDb.configureInstaller()
await dynamoDb.install()
```### Example
```ts
import { dynamoDb } from 'dynamodb-tooling'const port = 8000
// if you want to share with Bun Shell
// eslint-disable-next-line antfu/no-top-level-await
await dynamoDb.launch({
port,
additionalArgs: ['-sharedDb'],
})
// do your tests / trigger your logic
dynamoDb.stop(port)
```Alternatively, you can use it as a detached server:
```ts
const port = 8000
const child = await dynamoDb.launch({ port })
// trigger your logic
await dynamoDb.stopChild(child)
```## Configuration
The client can be configured using a `dynamodb.config.ts` _(or `dynamodb.config.js`)_ file and it will be automatically loaded.
```ts
// dynamodb.config.ts (or dynamodb.config.js)
export default {
installPath: path.join(os.tmpdir(), 'dynamodb-local'),
downloadUrl: 'https://d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_latest.tar.gz', // the official download URL
}
```## Testing
```bash
bun test
```## Changelog
Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
## Contributing
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
## Community
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)
For casual chit-chat with others using this package:
[Join the Stacks Discord Server](https://discord.gg/stacksjs)
## Postcardware
Stacks OSS will always stay open-sourced, and we will always love to receive postcards from wherever Stacks is used! _And we also publish them on our website. Thank you, Spatie._
Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States 🌎
## Sponsors
We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.
- [JetBrains](https://www.jetbrains.com/)
- [The Solana Foundation](https://solana.com/)## Credits
- [dynamodb-toolbox](https://github.com/jeremydaly/dynamodb-toolbox)
- [dynamodb-local](https://github.com/rynop/dynamodb-local)
- [Chris Breuer](https://github.com/chrisbbreuer)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
Made with 💙
[npm-version-src]: https://img.shields.io/npm/v/bun-reverse-proxy?style=flat-square
[npm-version-href]: https://npmjs.com/package/bun-reverse-proxy
[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/reverse-proxy/ci.yml?style=flat-square&branch=main
[github-actions-href]: https://github.com/stacksjs/reverse-proxy/actions?query=workflow%3Aci