From b6d309c47cc7bda672ae140dc5e9d9d91c5bc85d Mon Sep 17 00:00:00 2001 From: Matt Kiser <2197111+mkiser@users.noreply.github.com> Date: Tue, 2 Apr 2019 10:20:51 -0700 Subject: [PATCH 1/2] Update README.md Adding additional steps/details I needed to deploy this to prod. --- README.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8d79c21..af36aad 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,19 @@ [![Greenkeeper badge](https://badges.greenkeeper.io/postlight/mercury-parser-api.svg)](https://greenkeeper.io/) This repo provides a drop-in replacement for the [Mercury Parser](https://github.com/postlight/mercury-parser) API. -In fact, this [AWS Lambda](https://aws.amazon.com/lambda/)-based API for running the Mercury Parser is the same code -and serverless infrastructure that powered the Mercury Parser API. +In fact, this [AWS Lambda](https://aws.amazon.com/lambda/)-based API for running the [Mercury Parser](https://mercury.postlight.com/web-parser/) is the same code +and serverless infrastructure that powered the Mercury Parser API. The AWS Lambda free tier provides 1,000,000 free requests per month. ## Installation -```bash + +``` +# Upgrade / install Node +sudo npm cache clean -f +sudo npm install -g n +sudo n stable + +bash # If you don't already have the mercury parser api installed, do that git clone https://github.com/postlight/mercury-parser-api.git @@ -26,7 +33,13 @@ yarn serve ## Deploy -Assuming you've already [set up your default AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#cli-quick-configuration) (or have set a different AWS profile via [the profile field](serverless.yml#L21)), simply run: +Before deploying, you need to: + +1. [Install the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html) + +2. [Set up your default AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#cli-quick-configuration) (or have set a different AWS profile via [the profile field](serverless.yml#L21)). Follow this [guide for setting up your credentials](https://serverless.com/framework/docs/providers/aws/guide/credentials/#creating-aws-access-keys), using this gist of [suggested AWS IAM permissions](https://gist.github.com/ServerlessBot/7618156b8671840a539f405dea2704c8) + +To deploy, simply run: ```bash yarn deploy From 379c1e1fdc9b480691bd91aac5c7f8473e1df2fd Mon Sep 17 00:00:00 2001 From: Matt Kiser <2197111+mkiser@users.noreply.github.com> Date: Fri, 19 Apr 2019 09:58:24 -0700 Subject: [PATCH 2/2] formatting change. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index af36aad..a4ad347 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,12 @@ and serverless infrastructure that powered the Mercury Parser API. The AWS Lambd ## Installation -``` +```bash # Upgrade / install Node sudo npm cache clean -f sudo npm install -g n sudo n stable -bash # If you don't already have the mercury parser api installed, do that git clone https://github.com/postlight/mercury-parser-api.git @@ -41,7 +40,8 @@ Before deploying, you need to: To deploy, simply run: -```bash +``` + yarn deploy ```