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

netlify-plugin-stepzen

v1.0.4

Published

Netlify Build plugin - This plugin will deploy a stepzen API endpoint on every netlify build.

Downloads

23

Readme

Netlify Build Plugin: Deploy a StepZen GraphQL Endpoint Alongside a Netlify Build

The StepZen Netlify Build Pluign allows you to deploy a GraphQL API to StepZen during a Netlify build.

StepZen enables you integrate APIs and data into a single GraphQL API that forms the backend of your Jamstack site. You can populate your API with data from REST, databases or any backend. The StepZen plugin enables you to easily deploy and integrate the API in a Netlify build. No change is required to the Netlify deployment process. Your endpoint runs on StepZen, as a service, so that you don't manage any infrastructure.

For a full tutorial walkthrough showing how to build a Jamstack site using the StepZen Netlify Build Plugin, check our tutorial "How to build a database-driven Jamstack site" on the Netlify Blog.

Pre-requisites

  • required You have a Netlify account and site.
  • required You have a StepZen account.
  • optional, recommended You have installed the StepZen CLI tool npm install -g stepzen
  • optional, recommended You have built an API using StepZen. Go here for a quick "how to".

Usage

The first step is to install this plugin into your Netlify Site.

  • Search for stepzen in the Netlify plugins directory, and click the install button.

Next, configure the plugin.

  • Create a stepzen directory within your Netlify project root containing your API specification.
  • Add the environment variables (For options on how to add environment variables to Netlify, refer to their documentation):
    • STEPZEN_ACCOUNT specifies the name of your StepZen account. This can be found on the My Account page on StepZen.com;
    • STEPZEN_ADMIN_KEY specifies the admin API Key that enables access to deploy APIs on your account on StepZen. This can be found on the My Account page on StepZen.com
    • STEPZEN_NAME specifies the endpoint name for your API. This will determine the URL that your endpoint will deployed to. For example, a user with the account name biggs and a endpoint name of my-api will deploy as https://biggs.stepzen.net/netlify/my-api/__graphql (note that this assumes the dealt STEPZEN_FOLDER value is used).
  • Optionally, you can specify additional environment variables.
    • STEPZEN_FOLDER is a folder name under which your endpoint will be deployed (this defaults to netlify). StepZen generates the endpoint URL using a pattern of https://[account].stepzen.com/[folder]/[endpoint name].
    • Any environment variable that starts with STEPZEN_ are available in your config.yaml, so set your API keys here. [Find out more about adding API keys and other Secrets to your config.yaml safely](DOCS LINK HERE) on StepZen.com

How does it work?

The StepZen GraphQL API is deployed whenever a site build is triggered (for example, if you push into your connected git repository). You'll be able to view progress via the Netlify deploy log. For example, a successful deploy will output something similar to the following in the deploy log:

3:34:14 PM: ❯ Loading plugins
3:34:14 PM:    - [email protected] from Netlify app
3:34:14 PM: ​
3:34:14 PM: ────────────────────────────────────────────────────────────────
3:34:14 PM:   1. onPreBuild command from netlify-plugin-stepzen
3:34:14 PM: ────────────────────────────────────────────────────────────────
3:34:14 PM: ​
3:34:14 PM:  Deploying from StepZen account: biggs
3:34:14 PM:  using configuration sets netlify/configuration,stepzen/defaults
3:34:14 PM:  Pushing schema to netlify/my-api
3:34:16 PM:  Your endpoint is available at https://biggs.stepzen.net/netlify/my-api/__graphql
3:34:16 PM: ​
3:34:16 PM: (netlify-plugin-stepzen onPreBuild completed in 1.9s)

The API is deployed to StepZen prior to the site build step. This enables you to access data in your GraphQL API during the build process, allowing you to pre-render pages off of dynamic data from the API.

Where To Go From Here

You can learn more about build GraphQL APIs using StepZen via the StepZen documentation or via the StepZen blog.