0.4.0 • Published 4 years ago

@webfaas/webfaas-plugin-endpoint-http v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

WebFaas - Plugin - Endpoint - HTTP

WebFaaS Plugin for node.

NPM Version Linux Build Test Coverage

Config - Simple

{
    "endpoint.http": [
        {
            "port": "[http port]"
        }
    ],
    "endpoint.https": [
        {
            "port": "[https port]"
        }
    ]
}

Config - Complete

{
    "endpoint.http": [
        {
            "port": "[http port]",
            "hostname": "[http hostname]"
        }
    ],
    "endpoint.https": [
        {
            "port": "[https port]",
            "hostname": "[https hostname]",
            "httpConfig": {
                "ca": "[location ca]",
                "cert": "[location cert]",
                "pfx": "[location pfx]",
                "passphrase": "[passphrase]"
            }
        }
    ]
}

Example

curl -XPOST "http://localhost:8080/@registry1/math:multiply/1" -H "content-type:application/json" -d '{"x":2,"y":3}'
curl -XPOST "http://localhost:8080/@webfaaslabs/math:sum/0" -H "content-type:application/json" -d '{"x":2,"y":3}' -v

DOCS

License

MIT