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

sammie

v1.2.1

Published

Serverless Application Model Made Infinitely Easier

Downloads

56

Readme

SAMMIE - Serverless Application Model Made Infinitely Easier

AWS's Serverless Application Model (SAM) is the official AWS provided way to define serverless applications. sammie's purpose is to get you set up and deployed in seconds using SAM.

Features

  • Generate a minimal yet flexible SAM template for you to get started.
  • Simplify SAM's complex packaging & deploy steps & flags into a simple deploy command.
  • Provide a best practice for deploying multiple environments.

Prerequisites

AWS CLI - sammie uses this for all AWS operations under the hood.

Quickstart

npm i sammie -g
sammie init my-app
sammie deploy

This will generate a serverless application, deploy it to a development environment, and direct you to your app served over https!


Commands

init - Generates a serverless application including a SAM template & lambda function

sammie init <name>
Options:
-y, --yaml: Generate yaml for SAM template. Defaults to json, because javascript.

deploy - Deploys application

sammie deploy
Options:
-t, --template: Path to a SAM template. Defaults to sam.(json|yaml) in the current directory.
-e, --environment: An environment name to deploy. Defaults to "development".
-p, --parameters: A list of parameters to override in your template.
-s, --stack-name: Option to override the auto-generated environment stack name.
--s3-bucket: S3 bucket where code is uploaded. Defaults to Parameters.bucketName in template which is generated for you.
--s3-prefix: S3 path prefix added to the packaged code file. Defaults to stackName/year.


Environments

It's a best practice to create completely separate stacks for each of your application's environments, rather than a single stack with multiple lambda qualifiers, API Gateway stages, and permissions. This makes your application more portable and reduces the blast radius of taking down your live application during the development cycle.

To support this, sammie will deploy separate stacks for you based on the environment option:

E.g. your stack name is "my-app":
sammie deploy will deploy stack "my-app-development" (development is the default)
sammie deploy --environment production will deploy stack "my-app-production"

Environment variables & properties

To help add environment specific variables & properties, you can create separate SAM templates named with the environment suffix.
E.g. sam-production.json containing the following, will get merged with your base template sam.json upon sammie deploy --environment production

{
  "Resources": {
    "TestFunction": {
      "Properties": {
        "MemorySize": 1280,
        "Environment": {
          "Variables": {
            "ENV_VAR1": "var1-prod",
            "ENV_VAR2": "var2-prod"
          }
        }
      }
    }
  }
}