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

express-downstream

v0.1.4

Published

Hello world example to be used as a downstream server

Downloads

12

Readme

Express Downstream

A simple server which prints out information about the request including the path, method, headers and environment.

It is often used as a Docker container when setting up proxy configurations.

npm install
PATH_404=/404 PATH_500=/500 SCRIPT_NAME="" NAME='Hello!' PORT=8000 DEBUG=express-downstream node bin/express-downstream.js

With this setup, paths under /404 always return 404, paths under /500 return 500. Other paths return 200.

You can configure the following variables:

  • PORT - port to bind to, default 80
  • NAME - the heading of the page, default Express Downstream
  • SCRIPT_NAME the path at which a 200 page should be returned, default ''
  • PATH_404 the path at which express should always return a 404 page for any sub-path, if not specified, no 404 handler will be used
  • PATH_500 the path at which express should always return a 500 page for any sub-path, if not specified, no 500 handler will be used
  • DEBUG - can be express-downstream,express-downstream:debug for full debugging, express-downstream for lkey messages, or empty for no debugging

Changelog

0.1.4 2019-01-02

  • Show the value of NAME for each request (as well as the existing path and status) and show it in the X-Name response header

0.1.3 2019-01-02

  • Make the 404 and 500 paths configurable too
  • Handle SIGTERM
  • Changed default port to 80

0.1.2 2018-12-30

  • Added support for the SCRIPT_NAME environment variable
  • Made paths under /404 return a 404 status code, and paths under /500 return a 500 status

0.1.1 2018-12-15

  • Added a NAME environment variable defaulting to Express Downstream

0.1.0

  • Initial release