Search code examples
javascriptnode.jsecmascript-6ecmascript-harmonyes6-proxy

Using Harmony-proxy on Webserver node.js


I have a node.js code that runs a webserver and in this I'll like to use proxy Proxy link: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Proxy I'm using this shim: https://github.com/tvcutsem/harmony-reflect to load the proxy but it may require me to load the proxy in the cli rather than in node.js itself. Is there a way to load it in Node.js or is there another proxy that can be used to monitor changes in array for server-side code that will work far greater than client-side code as it will be receiving YUGE requests.


Solution

  • Proxy is supported natively in Node.js 6 (see Node.js ES 6 support). Just update Node.js to version 6 and you'll be able to use Proxy without any shims.