1.1.8 • Published 9 years ago

nep v1.1.8

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

nep


Nep is a proxy build with Node.js and Express.

Installation

$ npm install -g nep nep-responder-local

Example

Set up config.js

module.exports = [
  {
    pattern: 'http://www.my-site.com/',
    responder: 'local',
    options: {
      file: '/www/my-site/'
    }
  }
];

Run nep within the same directory of config.js

$ nep

Change the browser's proxy setting to 127.0.0.1:8989

or just set up the domain in hosts

127.0.0.1 www.my-site.com

Responder

Explore exists responders: npm responder search

you may install responders using npm:

$ npm install -g nep-responder-web

or you can make your own responders as a node module

it is similar with the express middleware:

module.exports = function(req, res, next, data){
	var options = data.options;
	var pattern = data.pattern;
	
	res.send('I respond');
};

then in the config.js file

var myResponder = require('path/to/myResponder');

module.exports = [
  {
    pattern: 'http://www.my-site.com/',
    responder: myResponder,
    options: {
      file: '/www/my-site/'
    }
  }
];
1.1.8

9 years ago

1.1.7

9 years ago

1.1.6

9 years ago

1.1.5

9 years ago

1.1.4

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.0.1

9 years ago