Skip to content

An HTTP proxy which could replace http requests with local files by rules

Notifications You must be signed in to change notification settings

longbill/node-devproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An HTTP proxy which could replace http requests with local files by rules

INSTALLATION

npm install -g node-devproxy

this command will install a global tool named "devproxy" to your system

GET A SAMPLE RULE FILE

in your working directory, run :

	devproxy -init

GET STARTED

	devproxy path/to/rules.ini

RULES

SYNTAX:
  		URL	LOCALFILE [method]
where:
	URL is the file url on server
	LOCALFILE is the replacement file on local disk
	method is optional, could only be GET or POST. default is GET

	in URL, 
		you can use * to represent any character ( except / )
		you can use *** to represent any character ( including / )
	in LOCALFILE,
		you can use * to represent any file name ( only in that folder )
		you can use *** to represent any file name ( including in sub-folder )

	when using * or ***, files will only be replaced if there is a local file with the same name

EXAMPLES:

	http://www.google.com/js/jquery.js  /var/www/googlejs/jquery.js
	http://www.google.com/js/*			/var/www/googlejs/*
	http://www.google.com/js/***		/var/www/googlejs/***

MORE EXAMPLES AND SETTINGS COULD BE FOUND IN rule-example.ini or create an example at your working directory using devproxy -init

About

An HTTP proxy which could replace http requests with local files by rules

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published