Skip to content

IRCraziestTaxi/hello-dynamo

Repository files navigation

hello-dynamo

A sample project demonstrating the use of a single DynamoDB table in nest.

.env

You need to create a .env file prior to building or running this app with the following variables:

AWS_ACCESS_KEY = XXXXX
AWS_ACCESS_SECRET_KEY = XXXXX
AWS_REGION = us-east-1 (for example)
DYNAMO_INDEX_READ_CAPACITY_UNITS = 1 (for example)
DYNAMO_INDEX_WRITE_CAPACITY_UNITS = 1
DYNAMO_TABLE_READ_CAPACITY_UNITS = 1
DYNAMO_TABLE_WRITE_CAPACITY_UNITS = 1

Creating and updating the table

Migrations are not really possible with DynamoDB. createTable/ensureTableExists wants options for indexes defined on the entity, so theoretical "previous migrations" where an index was previously not defined will fail to run because the options were not specified for that migration. Just use the migration-runner.ts file to update the table definition with index options specified as they change.

To create or update the table, run the command:

npm run mig:run

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.

NPM Version Package License NPM Downloads Travis Linux Coverage Gitter Backers on Open Collective Sponsors on Open Collective

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

About

Sample project using DynamoDB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •