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

serverless-dynalite-local

v0.3.0

Published

Serverless plugin to run DynamoDB locally with dynalite.

Downloads

131

Readme

serverless-dynalite-local

Serverless plugin to run DynamoDB locally with dynalite.

Motivation

When developing services in the Serverless Application Framework, it is common to use the serverless-offline plugin for local development. This plugin will enable you to run a local instance of DynamoDB, dynalite as well.

There are already some plugins out there that serves the same purpose, but they have some challenges.

  • serverless-dynamodb-local has a hard dependency on JRE, and is created to download the DynamoDB *.jar file before starting. While this might work on a local developer computer, it does not in a CI/CD environment. In addition, the serverless plugin does not support v2 and up.
  • serverless-dynalite comes with node-only dependencies, but has been unmaintained for a while and does not work on newer node runtimes.

We have, therefore, decided to create a new plugin which overcome the challenges from the above two plugins. We also have taken inspiration from serverless-s3-local, which does the same for AWS S3 with s3rver.

Usage

Install the plugin with yarn add --dev serverless-dynalite-local. Add serverless-dynalite-local to your serverless.yml plugins key, BEFORE serverless-offline.

By default the server will start up at http://localhost:4567 and use dynalite/ as a data directory. Connect to the database like this:

const client = new DynamoDBClient({
  endpoint: "http://localhost:4567",
});

The following options are supported in custom.dynalite in serverless.yml:

| Option | Description | Type | Default value | | ------ | ----------- | ---- | ------------- | | port | The port to listen on | number | 4567 | | path | The path to use for the LevelDB store | string | ./dynalite | | inMemory | Whether to only store data in memory (the path option will be ignored if this is true) | boolean | false |

Future plans

In it's current state, this plugin is very much untested in real use cases. The top priority is to make sure this works in actual use cases.

Next up is to improve the documentation and also explain how the underlying dynalite server can be used to run unit tests in Node.js projects.

In addition to this, we should make the plugin a little more configurable, and add some CI/CD for running tests, lint checks, and deployment.

I want to contribute to this library

Please see CONTRIBUTING.md.