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

rsync-glitch

v1.3.1

Published

Copies contents of your project to the external server πŸš€

Downloads

8

Readme

rsync-glitch

GitHub package.json dynamic npm bundle size

Copies contents of your project to the external server πŸš€


Have an external server but do not have an access to a professional code editor? Try using free Glitch.com platform as not hosting but a code editor in your browser!

Usage

It is good to use rsync-glitch when:

  • you don't have an access to an editor but still want to program your app which runs on an external server
  • the Glitch does not provide you enough of RAM memory and you want to use your own server
  • code-server package is an overkill for your current needs
  • you are just curious what does this package!

I can run my own VSCode in the web! Why should I use this? πŸ€·β€β™‚οΈ

code-server could be the thing you've been searching for, but it takes up to 500mb of RAM, when you can do all the same in the Glitch's editor with rsync-glitch package.


Step One: Install

To install this package you have to run

npm install -D rsync-glitch

Command above will add the development dependency to your package.json file.

Wait, package.json? I'm not using Node.JS at all! What should I do?

Don't panic, just add package.json by executing npm imit -y in command line!

Step Two: Set up the script

Change the "start" script in your package.json file:

{
  "scripts": {
    "start": "rsync-glitch -s ./ -d user@server:/home/user/app"
  }
}

What we are doing here:

  1. Executing the package rsync-glitch
  2. -s flag means the source folder where rsync would search for files to copy
  3. -d flag means the destination place where rsync would copy the files

Don't forget to change the user and server values to the actual username and IP!

Step Three (optional): Update .env

If you have a password for the user rsync would connect to by SSH, you have to create RSA keys to have secured and automated connection.

# Create key
ssh-keygen -t rsa

# Send it to the server
ssh-copy-id user@address

For more detailed explanation, see this site

Step Four: Server part

You have to start nodemon . on the server in the newly appeared directory.

nodemon package watches for the directory changes and restarts Node application automatically

Do not forget to install nodemon as a dev dependency in order to not get furious for repeatedly doing CTRL+C and node .:

npm i -D nodemon

Step Five: Code!

Now you can code freely and the changes you make would reflect on the server's contents!

Options

| Name | Description | Default | Required | | :---------------------: | ------------------------------------------------------------------- | :-------------: | :------: | | -s, --source [path] | Source folder rsync would copy from | "./" | | | -d, --dest | Destination address rsync would copy to | | βœ” | | -k, --key | Path for SSH RSA private key. Usually it is in .ssh/id_rsa | "./.ssh/id_rsa" | | | -l, --listen | Listen on port to make Glitch project stop showing 'loading' icon | | | | -t, --throttle | Adds a delay (in ms) before sending your changes to rsync | 1000 | | | -v, --verbose | Everything being verbosed | | | | -p, --port [number] | Custom SSH server port to connect | 22 | | | -f, --flags | Custom flags for rsync command | "avr" | |

Examples

  1. Simple
rsync-glitch
  --source ./src
  --dest [email protected]:/home/user/app
  1. Advanced
rsync-glitch
  --source ./src
  --dest [email protected]:/home/user/app
  --throttle 10000
  --flags "avzr"
  --port 8000
  --listen 3000

Contributions

...are welcome! Feel free to open an issue or a Pull request

License: MIT

Credits

Author: jarvis394 (github, vk)