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

beautiful-lasso

v0.1.3

Published

A tiny application to expose a file-system branch to the world.

Downloads

1

Readme

Build Status npm

Installation

sudo yarn global add beautiful-lasso
# or
sudo npm i -g beautiful-lasso

(the reason why it's beautiful-lasso and not lasso is because the name was already taken on npm)

Usage

RANCH=exposed_directory lasso [--port 8000]
# exposed_directory is relative to where the command is invoked

This will expose exposed_directory (also called the ranch ) to the world on port 8000 (default to 3000, the --port is optional). Of course this will not really expose the directory to the world unless you are running this command on a public machine and configure the firewall to accept entrances on the given port.

Configuration

By default, the files in the ranch are secured with http basic authentication. You'll need to create a .lasso.passwd into the ranch so you can register users. Here's an example of .lasso.passwd :

bob:bob_password

Now bob can request a file in the ranch :

curl http://alice.com:8000/database_backup.sql -u bob:bob_password
# you can run
curl http://alice.com:8000/database_backup.sql -u bob
# to prompt for the password so it's not written in bash history

.lasso.public

It's also possible to make some files available publicly without basic authentication required. Just create .lasso.public in the ranch :

public-file.txt
public-file2.txt

Now bob and whoever can request :

curl http://alice.com:8000/public-file.txt
# without the need of authentication

(wildcards are not supported at this moment)

You can also make a directory publicly. In .lasso.public :

public-file.txt
public-directory

Every file in public-directory are exposed,

curl http://alice.com:8000/public-directory/file1.txt

(note that making a directory public is not making its subdirectories public too, you have to explicitily write every directory you want to make public into .lasso.public)

This is Lasso philosophy, you just use your lasso to quickly grab some files, with a very basic layer of security.

Commands

You can also use command keywords, for example :

curl http://alice.com:8000/public-directory/latest -u bob
# This will fetch the last modified file inside public-directory