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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-deploy-sftp

v2.0.1

Published

A react app deployment tool.

Readme

A react app deployment tool

Easily deploy create-react-app apps via sftp.

It's possible to set up a basic react app using the amazing create-react-app, but moving from a local project to a deployed production application is not quite so simple. Typically, one must build the app for production, and then move the build directory over to the server. Fine for a once off, but for continuous development, it's a total pain.

This tool should make deployment easier. Deployment is as simple as running:

rup deploy production

Setup

Install the tool globally to make the rup cli available:

npm i -g react-deploy-sftp

Create a react-up.json file as follows, somewhere in your project. This can be in your project root, but for safety, I like to put it in a /deploy directory that is .gitignored so I never accidentally send private access keys or passwords to public Git repos.


{
  "production":{
    "buildDir" :"../build",
    "remoteDir":"/var/www/myreactapp",
    "remoteDirOwner": "owner",
    "remoteDirGroup": "www-data",
    "tarballName":"temp-deployment.tar",
    "host": "1.1.1.1",
    "port": 22,
    "username": "user",
    "password": "coolpassword"
  },
  "staging":{
    "buildDir" :"../build",
    "remoteDir":"/var/www/myreactapp",
    "remoteDirOwner": "owner",
    "remoteDirGroup": "www-data",
    "tarballName":"temp-deployment.tar",
    "host": "1.1.1.1",
    "port": 22,
    "username": "user",
    "password": "coolpassword"
  },
  ...
}

Notes on the above example react-up.json file:

  • "production" and "staging" correspond to the second command line argument when running rup.
  • You may have as many of these groups as you like, named whatever you like.
  • "buildDir" is the location of the build relative to the current working directory.
  • "remoteDir" is the location of the react app on the remote server.
  • "remoteDirOwner" sets chown owner when making directory
  • "remoteDirGroup" sets chown group when making directory
  • "tarballName" is the name of the temporary file created during deployment.
  • "host" is the ip address of the server
  • "port" is the port for ssh/sftp
  • "username" is the username for ssh/sftp
  • "password" is the password for ssh/sftp

FAQ

What's going on behind the scenes?

See cli.js.

  1. The build directory is rolled up in a tarball.
  2. Remote project directory is removed
  3. Remote project directory is recreated empty.
  4. The tarball is sftp'd across to the remote server.
  5. The tarball is dearchived.
  6. The tarball is deleted.

Why do I need to specify "deploy"?

In future I hope to implement other features such as ""init", "setup" and "teardown" etc.

Why "rup"?

  1. It's short and easy to type.
  2. It's a nod to "mup" which stands for "meteor up", a deployment tool for meteor that is just wonderful. I'd be using that if I could...but it's overkill for a simple react app and relies on docker images, which bring way too much overhead in my opinion. Maybe this is overkill for a simple react app too...ah... who knows...I've built it now.

Contributions?

Yes. Make a pull request, or report an issue on github. I'm also on twitter @aidanbreen if you want to discuss features, bugs or just give out.