Skip to content

Commit

Permalink
docs(proxy-events.md): fix example (#921)
Browse files Browse the repository at this point in the history
* Update proxy-events.md

The notation {'a', b} isn't syntactically correct nowadays, preferring {a: b}

* docs(proxy-events.md): fix prettier linting

---------

Co-authored-by: chimurai <655241+chimurai@users.noreply.github.com>
  • Loading branch information
pstephan9 and chimurai committed Jun 18, 2023
1 parent cd58f96 commit d7aa01d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions recipes/proxy-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const onProxyReq = function (proxyReq, req, res) {

const options = {
target: 'http://localhost:3000',
on: { 'proxyReq', onProxyReq }
on: { proxyReq: onProxyReq },
};

const apiProxy = createProxyMiddleware(options);
Expand All @@ -56,7 +56,7 @@ const onProxyReqWs = function (proxyReq, req, socket, options, head) {

const options = {
target: 'http://localhost:3000',
on: { 'proxyReqWs', onProxyReqWs }
on: { proxyReqWs: onProxyReqWs },
};

const apiProxy = createProxyMiddleware(options);
Expand All @@ -79,7 +79,7 @@ const onProxyRes = function (proxyRes, req, res) {

const options = {
target: 'http://localhost:3000',
on: { 'proxyRes', onProxyRes }
on: { proxyRes: onProxyRes },
};

const apiProxy = createProxyMiddleware(options);
Expand Down

0 comments on commit d7aa01d

Please sign in to comment.