{"id":50490749,"url":"https://github.com/uhop/dynamodb-toolkit-express","last_synced_at":"2026-06-02T02:30:59.365Z","repository":{"id":352575989,"uuid":"1215431377","full_name":"uhop/dynamodb-toolkit-express","owner":"uhop","description":"Express adapter for dynamodb-toolkit — mounts the standard REST route pack as Express middleware.","archived":false,"fork":false,"pushed_at":"2026-04-20T07:04:32.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-20T09:12:20.552Z","etag":null,"topics":["adapter","aws","aws-sdk","aws-sdk-v3","bun","crud","deno","dynamodb","dynamodb-toolkit","esm","express","express-middleware","hooks","http","middleware","pagination","rest","toolkit","typescript","zero-dependencies"],"latest_commit_sha":null,"homepage":"https://github.com/uhop/dynamodb-toolkit-express#readme","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uhop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-19T22:40:57.000Z","updated_at":"2026-04-20T07:04:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/uhop/dynamodb-toolkit-express","commit_stats":null,"previous_names":["uhop/dynamodb-toolkit-express"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/uhop/dynamodb-toolkit-express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uhop%2Fdynamodb-toolkit-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uhop%2Fdynamodb-toolkit-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uhop%2Fdynamodb-toolkit-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uhop%2Fdynamodb-toolkit-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uhop","download_url":"https://codeload.github.com/uhop/dynamodb-toolkit-express/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uhop%2Fdynamodb-toolkit-express/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33803734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adapter","aws","aws-sdk","aws-sdk-v3","bun","crud","deno","dynamodb","dynamodb-toolkit","esm","express","express-middleware","hooks","http","middleware","pagination","rest","toolkit","typescript","zero-dependencies"],"created_at":"2026-06-02T02:30:58.470Z","updated_at":"2026-06-02T02:30:59.359Z","avatar_url":"https://github.com/uhop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dynamodb-toolkit-express [![NPM version][npm-img]][npm-url]\n\n[npm-img]: https://img.shields.io/npm/v/dynamodb-toolkit-express.svg\n[npm-url]: https://npmjs.org/package/dynamodb-toolkit-express\n\nExpress adapter for [`dynamodb-toolkit`](https://github.com/uhop/dynamodb-toolkit) v3. Mounts the toolkit's standard REST route pack as an Express middleware — same wire contract as `dynamodb-toolkit/handler` (the bundled `node:http` adapter) and [`dynamodb-toolkit-koa`](https://github.com/uhop/dynamodb-toolkit-koa), translated for Express's `(req, res, next)` shape.\n\nZero runtime dependencies; `express` and `dynamodb-toolkit` are peer dependencies.\n\n## Install\n\n```sh\nnpm install dynamodb-toolkit-express dynamodb-toolkit express @aws-sdk/client-dynamodb @aws-sdk/lib-dynamodb\n```\n\n## Quick start\n\n```js\nimport express from 'express';\nimport {DynamoDBClient} from '@aws-sdk/client-dynamodb';\nimport {DynamoDBDocumentClient} from '@aws-sdk/lib-dynamodb';\nimport {Adapter} from 'dynamodb-toolkit';\nimport {createExpressAdapter} from 'dynamodb-toolkit-express';\n\nconst client = DynamoDBDocumentClient.from(new DynamoDBClient({region: 'us-east-1'}));\n\nconst adapter = new Adapter({\n  client,\n  table: 'planets',\n  keyFields: ['name']\n});\n\nconst app = express();\napp.use(express.json());\napp.use('/planets', createExpressAdapter(adapter));\napp.listen(3000);\n```\n\n`app.use(prefix, middleware)` is the idiomatic way to mount the adapter at a sub-path — Express strips the prefix from `req.path` natively. Unrecognized routes hand back to `next()`, so the adapter composes cleanly with the rest of your Express stack.\n\n## Options\n\n| Option               | Default                                      | Purpose                                                                                       |\n| -------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------- |\n| `policy`             | `defaultPolicy`                              | Partial overrides for prefixes, envelope keys, status codes.                                  |\n| `sortableIndices`    | `{}`                                         | Map sort-field name → GSI name for `?sort=` / `?sort=-field`.                                 |\n| `keyFromPath`        | `(raw, a) =\u003e ({[a.keyFields[0].name]: raw})` | Convert `:key` path segment to a key object (composite keys).                                 |\n| `exampleFromContext` | `() =\u003e ({})`                                 | Derive `prepareListInput` `example` from `{query, body, adapter, framework: 'express', req}`. |\n| `maxBodyBytes`       | `1048576` (1 MiB)                            | Cap for stream-parsed bodies, measured in bytes (ignored when a body-parser ran).             |\n\nConsumers using `express.json()` (or any compatible body-parser) can rely on the pre-parsed `req.body`; the adapter uses it when set, falls back to streaming the raw request otherwise.\n\n## Routes\n\nRooted at the mount point:\n\n| Method | Path               | Adapter method                |\n| ------ | ------------------ | ----------------------------- |\n| GET    | `/`                | `getList` (envelope + links)  |\n| POST   | `/`                | `post`                        |\n| DELETE | `/`                | `deleteListByParams`          |\n| GET    | `/-by-names`       | `getByKeys`                   |\n| DELETE | `/-by-names`       | `deleteByKeys`                |\n| PUT    | `/-load`           | `putItems`                    |\n| PUT    | `/-clone`          | `cloneListByParams` (overlay) |\n| PUT    | `/-move`           | `moveListByParams` (overlay)  |\n| PUT    | `/-clone-by-names` | `cloneByKeys` (overlay)       |\n| PUT    | `/-move-by-names`  | `moveByKeys` (overlay)        |\n| GET    | `/:key`            | `getByKey`                    |\n| PUT    | `/:key`            | `put` (URL key merged in)     |\n| PATCH  | `/:key`            | `patch` (meta keys → options) |\n| DELETE | `/:key`            | `delete`                      |\n| PUT    | `/:key/-clone`     | `clone`                       |\n| PUT    | `/:key/-move`      | `move`                        |\n\nWire contract — query syntax, envelope shape, meta-key prefixes, status codes — matches the bundled [HTTP handler](https://github.com/uhop/dynamodb-toolkit/wiki/HTTP-handler). Everything is configurable through `options.policy`.\n\n## Compatibility\n\n- **Express 4** and **Express 5** (peer range `^4.21.0 || ^5.0.0`).\n- **Node 20+**, **Bun**, **Deno** — the adapter's tests run cleanly under all three.\n\n## License\n\n[BSD-3-Clause](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuhop%2Fdynamodb-toolkit-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuhop%2Fdynamodb-toolkit-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuhop%2Fdynamodb-toolkit-express/lists"}