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

s3-server

v0.5.0

Published

Serve the contents of a S3 bucket (private or public) over HTTP

Downloads

21

Readme

s3-server

Serve the contents of a S3 bucket (private or public) over HTTP.

$ npm install -g s3-server
$ s3-server --key $AWS_ACCESS_KEY_ID --secret $AWS_ACCESS_KEY_SECRET --bucket my-s3-bucket --port 9101
Serving my-s3-bucket on port 9101

S3 Server is a proxy server which streams resources from an S3 bucket over HTTP. For example, in the example above, a request for "http://localhost:9101/index.html" would return the contents of "index.html" in the "my-s3-bucket", regardless of whether it's private or not (so long as the key provided has access).

Or, perhaps, you are hosting something like a GitBook in S3, and just want a nicer URL (e.g. https://s3.amazonaws.com/bucket-name/path/to/whatever/index.html to be http://myhost.com/whatever). Then you might do this:

s3-server --key $AWS_ACCESS_KEY_ID --secret $AWS_ACCESS_KEY_SECRET --bucket my-s3-bucket --prefix "path/to/" --port 9101

Parameters

  • --key parameter or AWS_ACCESS_KEY_ID environment variable. Required.
  • --secret parameter or AWS_SECRET_ACCESS_KEY environment variable. Required.
  • --bucket parameter or S3_SERVER_BUCKET environment variable. Required.
  • --endpoint parameter or S3_SERVER_ENDPOINT environment variable. Required.
  • --port parameter or S3_SERVER_PORT environment variable. Optional, defaults to 3010.
  • --prefix parameter or S3_KEY_PREFIX environment variable. Optional, defaults to empty string. Specifies a string to be prepended to the URL to find a file in S3 bucket. Note the trailing slash!

Developing

Please see the bin/server.js file if you're having any problems, the code for this module is very small, it delegates the work to express and knox.