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

beavertool-proxy-server

v1.0.1

Published

Clones/controls site including JavaScript initiated requests. Manages browser session in progress from cli. Template to emulate server backend context by local JavaScript application. Debugging JavaScript development for backend database calls without hav

Downloads

8

Readme

June 15, 2017.

Description.

"beavertool-proxy-server" is a small front end development helper which

    - clones web site including *.js files
    - requests to different web sites can be handled differently
    - intercepts database ajax calls and handles them in custom-made
      JavaScript application, beapp.js


1.  Look for the browser-proxy-remote-site diagram in the file
    "backend-server.js". Look for node-dependencies there.

2.  Express.js posed to us problems ... apperntly saving both binary
    and text files in the same session.
    
    The current solution with "native-vanilla" node.js libraries
    worked better.

Installation.

(if no parent project exists yet, do 
    npm init
)

from repository:
    npm install --save-dev beavertool-proxy-server
from file:
    npm install --save-dev beavertool-proxy-server-root.tar

Usage

There are two parts coming from installation package.

1. module core files:
   node_modules/beavertool-proxy-server/beavertool-proxy-server.js
   node_modules/beavertool-proxy-server/beavertool-proxy-server/do-save-path.js

2. test application:
   beavertool-proxy-server/test.js 
   
   copy this file into node-project root and run as
   node test.js
   then land your web browser on localhost:8086/

   modify test.js file for your needs

3. for more sofisticated use, see a template
   beavertool-proxy-server/app

Restrictions.

    The cloning of the site works only for "simple" sites.

    Which means for sites which do not have explicit
    "domain" in "domain"/"path" requests.

    The "domain" prefix is set right in configuration file,
    test.js, and initial path, aka index.html, is typed
    in address bar in the web browser by user.

    In other words, all of the calls from the browser to
    this site do use only relative part, "path".

    There is no protection against malformed "path"s
    inside web page. 
    For example, "path" = /../../../xxx.html may create file
    outside of node project which is insecure.

    In particular, if JavaScript will assembly "domain"/"path"
    token and request it, then request will bypass this proxy.


    To make this proxy real "master", set web-browser settings
    to its IP:port like in
    https://askubuntu.com/questions/513840/google-chrome-proxy-settings 

Installation.

npm install --save-dev cookie
...

Publishing this project

help: https://www.guru99.com/node-js-modules-create-publish.html


This is a sample from GitHub:

    start state: 
        new repository,
        lancelab/dev-proxy-server.git,
        created on GitHub, but the project
        is not checked in locally and no .git initialized
        under this project yet

    #create .gitignore if not yet done
    git init
    git add .
    git commit -m "first commit"
    git remote add origin https://github.com/lancelab/dev-proxy-server.git
    git push -u origin master

…or push an existing repository from the command line

    git remote add origin https://github.com/lancelab/dev-proxy-server.git
    git push -u origin master



$ npm publish
    + [email protected]
    stan@ubu:/var/www/html/sand/dev/platforms/nodejs/creating-node-modules/beavertool-proxy-server-root$