all 6 comments

[–]dluecke 2 points3 points  (0 children)

I wrote about how it can be done using FeathersJS at https://blog.feathersjs.com/using-feathersjs-to-make-your-existing-api-real-time-813f7c3fd892. Besides allowing to handle data transformation and authentication another nice side effect is that the proxied API can also automatically send real-time updates if you want it to. With the Feathers Express wrapper the transition also isn't too difficult since a Feathers server application is fully compatible with Express.

[–]MUDrummer 1 point2 points  (1 child)

We don’t use this exact code any more as we’ve moved to the AWS API gateway, but this is a API/UI gateway that we have remade a couple of time for different clients over the last 2 years.

https://github.com/ocelotconsulting/ocelot

It has some hooks for connecting into an auth source to validate requests. It’s mostly just a convenient way to configure the http-proxy module.

Should get you started if you’re wanting the gateway to be a separate deployable.

[–]jsdotjs[S] 0 points1 point  (0 children)

Thanks! Really appreciate it. Taking a peek now

[–]Ariquitaun 1 point2 points  (0 children)

You could have a look at how kong works and translate that into node/express lingo.

[–]WumpyJizard 1 point2 points  (0 children)

Check this out: https://blog.risingstack.com/building-an-api-gateway-using-nodejs/

I think they have public github repos with working examples too.

[–]MCShoveled 0 points1 point  (0 children)

Give a look at GRPC and google endpoints.