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

@staffbase/create-staffbase-plugin

v1.0.6

Published

![Staffbase Logo](https://staffbase.com/wp-content/themes/staffbase-theme/img/logo-blau.svg) ## Getting started Install the package in your global namespace and then run the command.

Downloads

30

Readme

Create-Staffbase-SSO-CLI Documentation

Staffbase Logo

Getting started

Install the package in your global namespace and then run the command.

$ npm install -g @staffbase/create-staffbase-plugin
$ create-staffbase-plugin /home/user1/work/staffbase-server/ --name staffbase-sso-server

You can use yarn create to directly run the command. The syntax of yarn create staffbase-plugin is:

yarn create @staffbase/staffbase-plugin [Destination folder] --name [Plugin Name]

Example:

$ yarn create @staffbase/staffbase-plugin /home/user1/work/staffbase-server/ --name staffbase-sso-server

Interactive Mode

You can also run the command without passing any arguments to get into interactive mode which would ask you the name of your app and the path where it need to be installed.

$ create-staffbase-plugin

Please enter npm compatible name: (my-staffbase-backend)
Please enter the folder path for the App: (/private/tmp/staffbase/my-staffbase-backend)
The directory you specified already exists. It will be overridden!
Do you wish to proceed (y)es|(n)o?: (no)

Setting up your project in:  /private/tmp/staffbase/server
Installing dependencies...se/server

On entering the path, you can either specify an absolute path or a relative path. The relative path is resolved against the current working directory (process.cwd()).

Configuration

After the scaffolding is complete, you need to provide some values for configuring your plugin server. The following values need to be configured.

  • Plugin Secret
  • Plugin Audience

You can either specify these values in environment variables or directly passing the values in the app.js file where the middleware is initialized.

To configure values in app.js file, change the following lines:

app.js

12 ...
13 ...
14 const key = null;
15 const pluginID = null;
16 ...

You can also specify these values using environment variables. Refer to the table to see which environment variables can be used.

| Value | Environment Variable | Default if not set | |:--------------|:--------------------------: |:----------------------------------------:| |Secret |STAFFBASE_SSO_SECRET | (empty) | |Audience |STAFFBASE_SSO_AUDIENCE | (empty) | |Server Port |PORT | 3000 | |Server Address |ADDRESS | (empty, listening on all IP addresses) |

Running the server

create-staffbase-plugin installs the project dependencies for you. After configurations is done, the only thing you need to do is navigate to the folder where your app was generated and start the express server.

$ cd [path of generated app]
$ npm start

License

Copyright 2017-2024 Staffbase GmbH.

Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0