UNPKG

express-gateway

Version:

A microservices API gateway built on top of ExpressJS

17 lines (14 loc) 283 B
module.exports = function (client) { const baseUrl = '/schemas/'; return { list (param = '') { let url = baseUrl; if (param) { url += encodeURIComponent(param); } return client .get(url) .then(res => res.body); } }; };