项目作者: ripta

项目描述 :
GCF version of postlight/mercury-parser-api
高级语言: JavaScript
项目地址: git://github.com/ripta/mercury-parser-api-gcf.git
创建时间: 2019-04-27T22:49:28Z
项目社区:https://github.com/ripta/mercury-parser-api-gcf

开源协议:MIT License

下载


mercury-parser-api-gcf is a reïmplementation of the Mercury Parser API
for Google Cloud Function instead of AWS Lambda, without the confusing-to-me
serverless layer. Unlike the full Mercury Parser API implementation,
this only includes the parser endpoint, which is mounted as /mercuryParser.

This function assumes you want to hide the API behind a static API key that is
determined at function deploy time. To install, you’ll need gcloud CLI that
has access to the GCP project under which you want the function to be deployed.

  1. Clone this repository locally.

  2. Create a new secrets.yaml file in the current directory containing:

  1. MASTER_MERCURY_API_KEY: 'TheKey'

where TheKey may be any string that will be your API key. The API key would
need to be passed in as the X-Api-Key HTTP header in all requests against the
function.

  1. Run npm install to download dependencies.

  2. Run make deploy.