Skip to content

Latest commit

 

History

History
98 lines (64 loc) · 1.58 KB

README.md

File metadata and controls

98 lines (64 loc) · 1.58 KB

Description

Event driven archictecture sample

Archictecture

Usage

Step 1: Install Nitric

Prerequisites
MacOs

Install with homebrew

brew install nitrictech/tap/nitric
Windows

Install with scoop

scoop bucket add nitric https://github.com/nitrictech/scoop-bucket.git
scoop install nitric
Linux

Download as a scripted install via curl.

curl https://nitric.io/install | bash

Note: Complete installation guide can be found here


Step 2: AWS Configuration

mv .env-template .env
AWS_SES_REGION="us-east-1"
AWS_SES_ACCESS_KEY_ID="..."
AWS_SES_SECRET_ACCESS_KEY="..."

SENDER_EMAIL="..."

Note: You'll need to whitelist these emails with amazon to send emails

Step 3: Run the API locally with Nitric

yarn install
nitric run

Step 4: Consume the API

curl --location --request POST 'http://127.0.0.1:9001/apis/public/customers' \
--header 'Content-Type: text/plain' \
--data-raw '{
    "firstname": "Test",
    "lastname": "User",
    "email" : "[email protected]"
}'

What's next?

Explore the Nitric framework to learn how to deploy to the cloud and much more.