Skip to content

Instantly share code, notes, and snippets.

@sajov
sajov / service-proxy.js
Last active January 10, 2020 00:31
Feathers js Service Proxy
const { Client } = require("undici");
const qs = require("qs");
exports.ServiceProxy = class ServiceProxy {
constructor(options) {
if (!options.remote) throw new Error("Options expect `remote`");
try {
this.client = new Client(options.remote, {
connections: options.connections || 100,