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

@siglar/cpub

v1.1.9

Published

Cloud Publisher

Downloads

10

Readme

Cloud Publisher

About

CLI to simplify / automate publishment of Google Compute Engine projects.

Purpose

Automated setup for running nodejs servers with simple distribution.

Requirements

  • NodeJS
  • Git
  • Debian 9 stretch VM (Virtual Machine) on Google Compute Engine: https://console.cloud.google.com/compute/instances
  • Install gcloud SDK: https://cloud.google.com/sdk/install
  • Mac or Linux. This is currently not supported for Windows (Unless you can run .sh files).

Installation

npm i -g @siglar/cpub

Commands

# Use to repair apt-get if broken
# WARNING! Use carefully. Read more here:
# https://askubuntu.com/questions/15433/unable-to-lock-the-administration-directory-var-lib-dpkg-is-another-process
pub --fix

# Info about current project
pub --info

# List projects
pub --projects

# Set current project
pub --project project

# Show current project
pub --proj

# Connect / authorize to work with current project
pub --auth

# List instances
pub --instances

# Show current instance
pub --ins

# Set current instance
pub --instance NAME.ZONE.PROJECT_ID
# Get NAME and ZONE from [ pub --instances ]
# Get PROJECT_ID from [ pub --projects ]

# Install dependencies on server
pub --install

# Set repoPath (Required to init)
pub --repoPath /path/to/new/repo
# Example: /home/webservice/repo

# Set hostPath (Required to init & publish / unpublish)
pub --hostPath /path/to/server/dir
# Example: /home/webservice/server

# Initialize new repository
# After this, push to server by: git push live master
pub --init

# Set host file (Required to publish / unpublish)
pub --hostRunnableFile dist/my_server.js

# Publish / distribute changes
pub --publish

# Unpublish / shut down server
# Does also stop database server
pub --unpublish

# Set port offset for database (Required for database)
# Client port = 28015 + offset & dashboard on port 8080 + offset
pub --offset 0

# Start / restart database
pub --database

# Set port number (required to open & close)
pub --port 8080

# Open Port
pub --open

# Close Port
pub --close

# ssh in to server for manual changes & fixes. (Currently shows command.)
pub --ssh

Notice

All arguments can be passed simultaneously.

Example

pub --open --port 8080
pub --instance NAME.ZONE.PROJECT_ID --install
pub --ssh --instance NAME.ZONE.PROJECT_ID

The latest configured values which are set will be used.


Grouped by Functionality

Methods

pub --auth
pub --install
pub --init
pub --publish
pub --unpublish
pub --database
pub --open
pub --close
pub --ssh
pub --fix

Setters

pub --project project
pub --instance NAME.ZONE.PROJECT_ID
pub --repoPath /path/to/new/repo
pub --hostPath /path/to/server/dir
pub --hostRunnableFile dist/my_server.js
pub --offset 0
pub --port 8080

Getters

pub --info
pub --projects
pub --proj
pub --instances
pub --ins