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

@karimsa/up

v0.3.2

Published

<h1 align="center">up</h1> <p align="center">Deployments made simple.</p>

Downloads

5

Readme

What's up?

up is a deployment tool meant to allow the deployment of load-balanced application clusters without extra config. You can think of it as a PaaS tool that utilizes an IaaS provider like DigitalOcean and provides the platform abstractions on the client-side instead of the server-side.

Getting Started

Log into your provider

The default provider is digitalocean - no other providers are currently supported.

$ up login
Please enter your API key:

Deploy your application

$ up
(Will spin up your dev environment)

For deployment, up only deploys three files from your repository: package.json, package-lock.json and whatever file is configured as main under package.json (defaulting to index.js).

Before shipping your entrypoint, parcel will be used to bundle all your local dependencies. Your third-party dependencies will be installed onto each server using npm.

More things you can do

Horizontally scale your deployment

To scale your deployment, you can use either an exact number that you want to use as the size of your application cluster - or a scaling expression to add/remove some number of clusters.

Here's some examples:

# add one instance
$ up scale :+1

# remove one instance
$ up scale :-1

# scale to 5 instances
$ up scale 5

Restart application servers

Here's some examples:

# restarts all servers in the cluster
$ up restart

Setting environment variables

Environment variables are shared between all computers within an application cluster (there's only one application cluster supported per package.json for now).

Here's some examples:

# list all your environment variables
$ up env
    NODE_ENV    =>  'production'
    PORT        =>  80

# fetch the value for MONGO_URI from any server in the cluster
$ up env MONGO_URI

# fetch the value for MONGO_URI from every server in the cluster
$ up env MONGO_URI --all

# sets 'MONGO_URI'
$ up env MONGO_URI 'mongodb://localhost/app'

View application logs

Here's some examples:

# prints logs from all servers in cluster
$ up logs

# prints logs in tail mode
$ up logs -f

List all application servers

Here's some examples:

# lists all servers in your cluster
$ up list

Check the status of a deployment

# Lists all servers & their current status including time
# since last deployment and the running application version
$ up status
Number of servers: 1

 - myapp-development-1 [116845563 - RUNNING]:
        IP: 123.456.789.100
        Uptime: 6m 6s
        App version: 0.1.1
        Bundle hash: 887b7d69ae

Execute a command within a virtual environment

up comes with a utility command for you to run any command hoisted into a virtual environment that is composed of the same environment variables as your application cluster.

Environment variables from the remote environment will be given precedance over local variables, but the two environments will be merged for the child process. So if you have any implicit defaults, you might run into issues (moral: use explicit defaults).

Here's some examples:

$ up exec -- export
$ up exec -- node scripts/blah.js

License

Licensed under MIT license.

Copyright © 2019-present. Karim Alibhai.