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.
-
Clone this repository locally.
-
Create a new
secrets.yaml
file in the current directory containing:
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.
-
Run
npm install
to download dependencies. -
Run
make deploy
.