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

gander-cli

v1.0.1

Published

framework to create full-stack review apps on AWS

Downloads

3

Readme

Gander automates the provisioning, state, and teardown of your review apps while allowing you maintain full control over your source code and self-hosted infrastructure. Currently, we only support AWS as a cloud provider and Postgres as a database.

To learn more, please read our extensive case study.

oclif Version Downloads/week License


Table of Contents

Prerequisites

  • AWS Account
  • AWS CLI Configured with your AWS Account
  • Node + NPM
  • Application Repository

Can my application use Gander?

Your application is supported by Gander if it:

Installation and Setup

  • To get started, run the command npm install -g gander-cli to globally install Gander on your machine

  • Before initializing Gander with any applications, you must run gander setup, which will provision and configure all of the necessary infrastructure you need to begin deploying review apps. See Commands for more information about this command. Keep track of the AWS access keys that are generated during this process - this is the only place they will ever appear.

  • Add a wildcard CNAME DNS Record to the domain you provided

$ npm install -g gander-cli
$ gander setup
running setup...
$ gander (-v|--version|version)
gander-cli/0.0.1 darwin-x64 node-v14.15.1
$ gander --help [COMMAND]
...

To integrate Gander with an application:

  • Navigate to the root of your project repository
  • Ensure you are on your application's main branch - Gander requires that the generated Github workflow files be present on this branch for the review app process.
  • Run gander init - See Commands for details about each piece of information init requires.
  • Add the AWS Access Keys that were generated during gander setup as secrets to your project's Github repository.
  • For Python applications, provide the entrypoint command in a Procfile in the root directory using the format web: $ENTRYPOINT. The app needs to run on port 8080 with 0.0.0.0 as the host. See the Procfile in our sample Django app for an example.
  • Django applications can include '*' as one of their ALLOWED_HOSTS because Gander's load balancer handles host header validation.

Environment Variables

Gander uses environment variables to manage the connection to the database. Your application needs to use these three environment variables:

  • PG_HOST -- This is the host name for your database connection.
  • PG_USER -- This is the username for postgres database.
  • PG_PW -- This is the password for the postgres database.

Gander also needs to be able to set the port your application server listens on using the environment variable PORT.

To add additional environment variables to your application server's runtime, follow these steps:

  1. Add your environment variables to your repository's secrets.
  2. Open .github/actions/build-server/action.yml
  3. Add your environment variables to the pack build command, on lines 22-23.

For example, if you have an API_TOKEN environment variable, it would be added like this after you create your secrets:

  pack build $IMAGE_ARN \
  --builder $BUILDER \
  --path $SERVER_PATH \
  --env API_TOKEN=${{ secrets.API_TOKEN }} \
  --publish

If you have both an API_TOKEN and an API_URL, you can add two environment variables like this:

  pack build $IMAGE_ARN \
  --builder $BUILDER \
  --path $SERVER_PATH \
  --env API_TOKEN=${{ secrets.API_TOKEN }} \
  --env API_URL=${{ secrets.API_URL }} \
  --publish

Commands

gander destroy

Destroy all AWS resources created for Gander review apps

USAGE
  $ gander destroy

See code: src/commands/destroy.js

gander help [COMMAND]

display help for gander

USAGE
  $ gander help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

gander init

Initialize your project repository as a Gander review app

USAGE
  $ gander init

See code: src/commands/init.js

gander list

List all active Gander repos

USAGE
  $ gander list

See code: src/commands/list.js

gander setup

Create all the AWS resources required to deploy Gander review apps

USAGE
  $ gander setup

See code: src/commands/setup.js

gander where

Print out the location of your Gander global configuration file

USAGE
  $ gander where

See code: src/commands/where.js