Skip to content

Scalable API gateway made simple, fast and easy to configure.

License

Notifications You must be signed in to change notification settings

weekendesk/nodegate

Repository files navigation

nodegate

The easy plugin to programmatically manage a horizontally scalable JSON API Gateway. Built on top of Express & Request.

Test and lint Dependencies status Version

const nodegate = require('nodegate');
const gate = nodegate();
const { aggregate } = nodegate.workers;

gate.route({
  method: 'get',
  path: '/user/:user',
  workflow: [
    aggregate('get', 'https://api.github.com/users/{params.user}'),
    aggregate('get', 'https://api.github.com/users/{params.user}/gists'),
  ],
});

gate.listen(8080);

Usage

Nodegate usage

This plugin will help you to solve the well known problem of API management. Some people are doing this by themselves, others by using complex tools or services. But even with this kind of systems you will have to program some mechanics. Nodegate helps you to programmatically configure, develop and run your API gateway, in the simple way.

Everything can be done by declaring routes with a workflow containing workers. Each worker modify a container for composing the response. That's it.

A bunch of workers are bundled with this plugin, but everyone can create more easily!

Documentation

The complete documentation can be found here

License

Copyright (c) Weekendesk SAS.

MIT