node-decorate

0.2.0 • Public • Published

node-decorate

A proxy server to decorate a html/xml document with jQuery.

Use case

Case 1.Inside web server

  • Install to server(s) web server running.
  • Route HTTP requests to this proxy.

Case 2. Independent proxy

  • Install to any server(s).
  • Access this proxy by formatted URL.(see below)

Install

npm install node-decorate

Comming soon !

Usage

Hello, world

  1. Edit /src/custom.js
module.exports = {
  append_manipulate : ['hello']
}
 
module.exports.proc_for_elements = {
  hello : function($) {
    $('body').attr('onload', 'alert("Hello, world !")');
  }
};
  1. Start a proxy.
node index.js
  1. Access any site through this proxy. ex. http://127.0.0.1:8124/http/nodejs.org/

URL format

Tips

Start a proxy on production mode

npm start

Load jQuery from local file

TODO: later

Start on port 80

TODO: later

/node-decorate/

    Package Sidebar

    Install

    npm i node-decorate

    Weekly Downloads

    0

    Version

    0.2.0

    License

    BSD

    Last publish

    Collaborators

    • fullkawa