npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dynamigrate

v2.0.0

Published

wrapper for AWS DynamoDB

Downloads

1

Readme

Dynamigrate

nodeでAWS DynamoDBを操作する, aws-sdkのオレオレラッパ。

Usage

Functions

up

DynamoDBにテーブルを作成する.

listTables

DynamoDB上に作成されたテーブルの一覧を取得する.

scan

指定したテーブルのレコードの一覧を取得.

drop

DynamoDBより指定したテーブルを削除する.

Test

テストを実行するには事前にdynamodb-localの環境を作成する必要があります。

dockerでdynamodb-localを起動する場合

deangiberson/aws-dynamodb-local をDockerで起動。 test.jsに記載されているendpointを以下のように変更。

test.js

var awsParams = {
	accessKeyId: accessKeyId,
	secretKeyId: secretKeyId,
	region: region,
	endpoint: "http://192.168.99.100:32779" //起動したDockerイメージのURL
};

setup your AWS keys and start DynamoDB local.

AWSアクセスキーの設定

export AWS_ACCESS_KEY=YOUR_AWS_ACCECSS_KEY
export AWS_ACCESS_SECRET=YOUR_AWS_ACCESS_SECRET

テストの実行

npm run test
> [email protected] test /Users/node-dynamigrate
> mocha test/dynamigrate/test.js


  dynamigrate
    ✓ テーブルが作成される (420ms)
    ✓ テーブルの一覧が取得できる
    ✓ テーブルにレコードが追加できる (127ms)
    ✓ テーブルが削除される


  4 passing (612ms)