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

proxy-lite

v2014.8.27-10

Published

lightweight nodejs proxy server with no external dependencies

Downloads

8

Readme

proxy-lite

lightweight nodejs proxy server with no external dependencies

heroku.com test server

build status travis.ci-org build status

build commit status

saucelabs.com selenium test status

git branch | test server | test report | coverage report | build artifact :----------:|:-----------:|:-----------:|:---------------:|:--------------: master | heroku.com test server | test-report | istanbul coverage report | build artifacts beta | heroku.com test server | test-report | istanbul coverage report | build artifacts alpha | heroku.com test server | test-report | istanbul coverage report | build artifacts

quickstart

## npm install proxy-lite
npm install proxy-lite
cd node_modules/proxy-lite
## start proxy server on port 8080
npm start --server-port=8080

library usage example

// example.js
/*jslint
  bitwise: true,
  indent:2,
  node: true
*/
(function () {
  'use strict';
  var port, server, utility2;
  // require utility2 module
  try {
    utility2 = require('utility2');
  } catch (error) {
    utility2 = require('./main.js');
  }
  // create random port in the inclusive range 0x8000 - 0xffff
  port = (Math.random() * 0xffff) | 0x8000;
  console.log('proxy test server starting on random port ' + port);
  // init server with proxy middleware
  server = require('http').createServer(function (request, response) {
    utility2.serverMiddleware(request, response, function (error) {
      utility2.serverRespondDefault(response, error ? 500 : 404, error);
    });
  });
  // set server to listen on the specified port
  server.listen(port, function () {
    console.log('proxy test server started on port ' + port);
    setTimeout(function () {
      server.close();
      console.log('proxy test server closed after 1 second');
    }, 1000);
  });
}());

run npm test

npm test

description of files

  • .travis.yml
    • travis-ci config file
  • README.md
    • readme file
  • example.js
    • example nodejs script demonstrating how to use this app
  • main.data
    • data file containing embedded resources specific to this app
  • main.js
    • this app's main program / library
  • package.json
    • npm config file
  • utility2.data
    • data file containing embedded resources used by travis-ci
  • utility2.js
    • nodejs build script used by travis-ci
  • utility2.sh
    • shell build script used by travis-ci

todo

  • flesh out proxy server code

changelog

2014.8.27

  • update to latest utility2 build code

2014.7.2

  • autoload package.json
  • auto-reload utility2.data
  • add --repl-mode
  • fix test report time
  • automate heroku deployment in build
  • add test report badge
  • fix npm build
  • split subModuleBuildNodejs into subModuleBuildShared and subModuleBuildNodejs
  • split node-proxy-lite.js into node-proxy-lite.js and utility.js

2014.7.1

  • initial commit