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

deploy-handler

v1.2.0

Published

A CLI to deploy projects with just one command

Downloads

7

Readme

Deploy Handler

Deploy handler is a configurable command-line interface to let you upload your build files to a remote HTTP server with just one command.

Currently supported server programming languages for the remote server are Node.JS and PHP

Installation

npm install -g deploy-handler

Usage

deploy <Server Programming Language> [Options]

Where <Server Programming Language> is one of

php, node (Express)

And [Options] can be any of

| Option | Alias | Description | | ------------ | ----------- |------------ | | --from | -f | Path to the local build folder that will be deployed to the remote server. | | --to | -t | Link to the remote deploy handler. | | --secret | -s | Private key that will be used to sign the package. |

Or just cd to your project directory and run deploy and follow the instructions.

How it works

Deploy handler is configured by 4 main variables:

| Var Name | Default | Description | | ------------ | ----------- |------------ | | lang | PHP | The programing language used in the server-side of the remote HTTP server. The deploy command will use this to generate a script that needs to be placed on the server-side in order to receive deployed packages. | | from | ./build | The relative path to the build directory where the content of this directory will be sent to the remote HTTP server | | to | https://example.com/deploy-handler.php | The link to which build files will be sent. This link should resolve to the deploy handler script generated by the deploy command | | secret | ****** | The private key that will be used to sign the package in order to verify the identity of the sender. |

Once you enter these variables for the first time, they are saved in a json file deploy-config.json and the private key secret is saved under .deploy-temp/.secret.env.local. The .deploy-temp folder must be added to .gitignore as it contains the private key used to sign the package. When you run deploy, the deploy-handler CLI compresses the build files into a zip archive, signs the zip archive, and sends it to a remote server to unzip it to its correct location on the server. But before sending the build files to the remote server, the CLI generates a template script that needs to be placed on the remote server in order to handle the sent package, verify the signature and extract files into the correct location.