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

http-send-receive-files

v1.1.1

Published

Simply send or receive files from a remote server to your local PC via HTTP

Downloads

6

Readme

Http Send Receive files

npm version install size

Simply send or receive files from a remote server to your local PC via HTTP. It is useful when you don't have an easy access to a remote server (ie a linux provided via a citrix on windows).

[!CAUTION] use it with precaution, in a short period of time and don't share any sensitive files

Install and usage

Global installation or update:

npm install -g http-send-receive-files

Usage:

# With default values
hsrf

# Override values
HOSTNAME=0.0.0.0 PORT=3000 \
  DIR=storage \
  LT_ENABLED=false LT_SUBDOMAIN= LT_HOST= \
  hsrf

For tunneling, see next.

Tunneling

If you want to enable remote access when your server and your PC is not a the same network, use a tunneling system.

Localtunnel is embedded and you can activate it with LT_ENABLED environment variable :

LT_ENABLED=true hsrf

If you want a specific subdomain, set LT_SUBDOMAIN environment variable.

Default localtunnel server is https://localtunnel.me. You can override it with LT_HOST environment variable.

It logs the tunnel URL and password which is your public IP. Open the provided link in a browser on the remote system if you are able to and provide tunnel password.

Or with curl on your remote server (here bypassing localtunnel reminder and with a virtual mysubdomain subdomain):

# Upload to your PC
curl \
  -H "bypass-tunnel-reminder: yes" \
  -F "file=@/path/to/example.txt" \
  https://mysubdomain.loca.lt/upload

# Download from your PC
curl \
  -H "bypass-tunnel-reminder: yes" \
  --remote-name --remote-header-name \
  "https://mysubdomain.loca.lt/download?filename=example.txt"

Development

Needed tools : node

Default storage directory is storage relative to current directory and is used both for uploaded files and downloadable files. You can override it witj STORAGE_DIR environment variable which could be relative or absolute.

# Get dependencies
npm ci

# Start server
npm run start

Open http://localhost:3000/

Or with curl on your remote server:

# Upload to your PC
curl \
  -F "file=@/path/to/example.txt" \
  http://mycomputername:3000/upload

# Download from your PC
curl \
  --remote-name --remote-header-name \
  "http://mycomputername:3000/download?filename=example.txt"

Deployment

# Update version number (ie version, major, minor, patch)
npm version patch

# Publish
npm publish