Skip to content

vieiralucas/dinossauro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dinossauro

Dinossauro is a simple way of running the last dynamodb-local version over node

npm install dinossauro
// usage with mocha

const dinossauro = require('dinossauro');

describe('my acceptance test', () => {
  before(dinossauro.up);
  after(dinossauro.down);
});
// dinossauro.up returns a promise that will resolve when dynamo is ready
dinossauro.up()
  .then(dynoDbProcess => {
    // here you can do anything you want with the dynamo process
    dynoDbProcess.stdout.pipe(process.stdoud);
  });
// dinossauro.up accepts an options object parameter which is passed to dynamo
// the default values follow:
{
  port: 8000,
  inMemory: true,
  sharedDb: true
}

// if you pass an dbPath parameter then inMemory is automatically set to false
{
  dbPath: '/tmp/mydbfolder'
}

About

Dinossauro is a simple way of running the last dynamodb-local version over node

Resources

Stars

Watchers

Forks

Packages

No packages published