Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


The middleware examples with proxy-by-url do not work for my config #86

digitalrinaldo opened this Issue · 4 comments

2 participants




and the example at the proxy-by-url workspace


throw e; // process.nextTick error, or 'error' event on first tick
SyntaxError: Unexpected token ;
at Module._compile (module.js:397:25)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
at Function._load (module.js:293:12)
at Array. (module.js:421:10)
at EventEmitter._tickCallback (node.js:126:26)

I can't seem to get this example

'/database': { port: 5984, host: 'localhost' },

or the url-middleware.js example to work with node I am getting a
unexpected token

m1:node rinaldo$ node url-middleware.js


m1:node rinaldo$ npm info proxy-by-url
{ name: 'proxy-by-url',
description: 'custom logic for node-http-proxy to proxy basedon incoming
'dist-tags': { latest: '0.0.0' },
versions: '0.0.0',
maintainers: 'dominictarr',
time: { '0.0.0': '2011-07-30T09:55:29.217Z' },
author: 'Dominic Tarr (',
{ type: 'git',
url: 'git://' },
version: '0.0.0',
homepage: '',
dependencies: {},
devDependencies: {},
scripts: { test: 'meta-test test/.js' },
engines: { node: '
' },
{ shasum: 'ee8c04d31d20996e7d4a4ce888379890119a73ea',
tarball: '' },
directories: {} }

Reply to this email directly or view it on GitHub:


uh, this is a syntax error in /private/tmp/http-proxy/1.js

this looks like a missing { or (
or possibly a comment //
on the last line, or an unclosed block comment. /*

it looks like the way you have your enviroment setup is very odd.

have a look in /private/tmp/http-proxy/1.js

also, there was a mistake in proxy-by-url please install the new version. (then your pasted code will work)


sorry, I just realized that you had already emailed me about this.

please install/pull the new version and also cd examples && npm install

also fixed a small mistake in proxy-by-url, now it's at 0.0.1

this should work now, please confirm.


Works on my mac with 0.4.9 fails on 4.11-pre on centos


cool, thanks.

will check this again when 0.4.11 is offically released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.