Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/josecarneiro/funcional

☁️ Simplify working with Google Cloud Platform functions
https://github.com/josecarneiro/funcional

Last synced: about 1 month ago
JSON representation

☁️ Simplify working with Google Cloud Platform functions

Awesome Lists containing this project

README

        

# `funcional`

Requires node version `8.x.x`. The compatibility of this library should match the node LTS release schedule, since that is the version used by Google Cloud Functions.

### Client

The client class should be used in response to a `http` trigger.

Initiating it takes two arguments: the `request` and `response` objects passed to the GCP function.

The instance has two methods:

#### json(data[, status])

Stands for a valid response. Responds with a JSON object. Can optionally include a status code (defaults to 200).

#### error(data[, status])

Responds with an error.

### Server

The `funcional` library also includes an interface to interact with GCP functions in the server.

### TO DO:

Rename as `funcional`.