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

ipa

v0.1.2

Published

A lightweight file server built on StoutJS.

Downloads

11

Readme

ipa

A simple and lightweight NodeJS file server built on StoutJS.

Command Line Interface (CLI)

ipa start

Starts the ipa server.

Options

--config, -c

Specify the configuration file to use. May be formatted as JSON or YAML.

--hostname, -h

Specify the server's hostname.

--address, -a

Address to use (defaults to 0.0.0.0).

--port, -p

Port to use (defaults to 8080).

--public, -P

Specify the public root directory. Defaults to the current directory.

--ssl

Enable SSL.

--cert

Path to SSL certificate file.

--key

Path to SSL key file.

ipa stop

Stops the ipa server.

--force, -f

Force-stop and immediately terminate all connections.

ipa restart

Restarts the ipa server.

--force, -f

Force-stop and immediately terminate all connections.

ipa status

Show the current status of the ipa server.

Configuration

ipa doesn't require any configuration for basic functionality. For more advanced features, use a configuration file or specify options using the command line.

Config Files

ipa doesn't need any configuration files, but it can use them for more advanced functionality.

Config File Locations

Configuration files can be specified using the command line, or it can discover them automatically. It looks for configuration files in the following locations, in this order:

  1. The current working directory.
  2. The current user's home directory, i.e. ~/
  3. /usr/local/etc/
  4. /usr/etc/
  5. /etc/

Config File Naming

When looking for configuration files, ipa checks for the following file names in the order below:

  1. ipa.json
  2. ipa.yaml
  3. .ipa.json
  4. .ipa.yaml

Configuration files of any name may be specified via the command line.

Example Config Files

The configuration file describes a secure site at https://example.com which has https://www.example.com, http://example.com, and http://www.example.com all redirecting to the secure, non-www version.

{
  "sites": [
    {
      "hostname": "example.com",
      "port": 443,
      "public": "/var/www/public",
      "ssl": true,
      "cert": "/var/certs/example.com.pem",
      "key": "/var/certs/example.com.key",
      "redirect": ["www.example.com"]
    },
    {
      "hostname": ["example.com", "www.example.com"],
      "port": 80,
      "redirect": "https://example.com"
    }
  ]
}

Config Options

Note: All relative paths are relative to the configuration file's location.

sites

An array of sites (or virtual hosts) which this ipa server hosts. Each site may have the following configuration options.

| Site Config | Description | | ----------------- | ----------------------------------------------------| | hostname | The site's hostname. | | port | The port on-which to serve the site. | | public | The path to the site's public files. | | redirect | Generates a 301 redirect to the given address. | | ssl | true to serve the site using HTTPS. | | cert | Path to SSL certificate. | | key | Path to SSL key file. |

If ipa is serving only one site, the single-element array can be omitted and these properties may be declared at the config's top-level.

For example, if only one site is to be served, a simple configuration could be:

{
  "hostname": "example.com",
  "port": 80,
  "public": "/var/www"
}