Sign inSign up

asyncy/http

By asyncy

•Updated almost 7 years ago

The Asyncy API gateway server for executing Stories via HTTP

Image
0

7.1K

asyncy/http repository overview

⁠Asyncy HTTP Gateway

API gateway server for executing Stories via HTTP.

when http server listen method: 'get' path: '/' as req
    log info msg: req.body
    log info msg: req.headers
    log info msg: req.headers['Host']
    req write data: 'Hello World'
    req status code: 200
    req finish
curl https://foobar.asyncyapp.com
>>> Hello World

⁠Development

Setup virtual environment and install dependencies

virtualenv -p python3.6 venv
source venv/bin/activate
pip install -r requirements.txt

Run locally by calling

python -m app.main --logging=debug --debug
⁠Register an endpoint
curl --data '{"endpoint": "http://localhost:9000/story/foo", "data":{"path":"/ping", "method": "post"}}' \ 
     -H "Content-Type: application/json" \ 
     localhost:8889/register

Now access that endpoint

curl -X POST -d 'foobar' http://localhost:8888/world
⁠Unregister an endpoint
curl --data '{"endpoint": "http://localhost:9000/story/foo", "data":{"path":"/ping", "method": "post"}}' \ 
     -H "Content-Type: application/json" \ 
     localhost:8889/unregister

Tag summary

Content type

Image

Digest

Size

336.9 MB

Last updated

almost 7 years ago

docker pull asyncy/http:v0.2.1-33-g536a1cb