api-joe

0.4.4 • Public • Published

API Joe

An API Gateway to easily expose your services to web clients

Our main features are:

  • Request routing based on various parameters such as path, headers and domain
  • Automatic SSL handling through Let's Encrypt
  • User session management
  • Outgoing events via WebSocket and redis publish
  • Replicable by offloading any state to shared remote redis db

Get Started with Docker

The official image repository in Docker Hub is gcsboss/api-joe.

Run like this: docker run -p 9000:9000 gcsboss/api-joe

Configuration

port = 9000

[auth]
method = 'POST'
url = 'http://auth-api/path'
timeout = 3000
onSuccess = 'http://webhook-url/auth-success'

[redis]
host = 'session'
port = 6379

[services]

[services.my-service]
url = 'http://host-of-service'
endpoints = [
    'POST /something',
    'GET /stuff'
]

Services

To specify your services, use the following structure:

  • Endpoint: a string with the method and path from your service, you mean to expose

  • Service: object with:

    • url: string with protocol host and port to reach your services
    • endpoints: array of Endpoint
  • services: object with:

    • <service name>: Service

Reporting Bugs

If you have found any problems with this module, please:

  1. Open an issue.
  2. Describe what happened and how.
  3. Also in the issue text, reference the label ~bug.

We will make sure to take a look when time allows us.

Proposing Features

If you wish to get that awesome feature or have some advice for us, please:

  1. Open an issue.
  2. Describe your ideas.
  3. Also in the issue text, reference the label ~proposal.

Contributing

If you have spotted any enhancements to be made and is willing to get your hands dirty about it, fork us and submit your merge request so we can collaborate effectively.

Dependencies (11)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i api-joe

    Weekly Downloads

    1

    Version

    0.4.4

    License

    MIT

    Unpacked Size

    50.5 kB

    Total Files

    20

    Last publish

    Collaborators

    • gcsboss