ky213 / receeve

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EmailEvents notifier with serverless framework and AWS

Setup

npm install

Serverless offline

install local dynamoDB instance

serverless dynamodb install

start local dynamoDB instance

serverless dynamodb start

crate table

after dynamodb started locally, go to http://localhost:4002/shell and create a receeve-emailevents-local table using this schema:

{
  "TableName": "receeve-emailevents-local",
  "KeySchema": [
    {
      "AttributeName": "id",
      "KeyType": "HASH"
    }
  ],
  "AttributeDefinitions": [
    {
      "AttributeName": "id",
      "AttributeType": "S"
    }
  ],
  "ProvisionedThroughput": {
    "ReadCapacityUnits": 1,
    "WriteCapacityUnits": 1
  },
  "GlobalSecondaryIndexes": [
    {
      "IndexName": "index_name_1",
      "KeySchema": [
        {
          "AttributeName": "id",
          "KeyType": "HASH"
        }
      ],
      "Projection": {
        "ProjectionType": "INCLUDE",
        "NonKeyAttributes": ["attribute_name_1"]
      },
      "ProvisionedThroughput": {
        "ReadCapacityUnits": 1,
        "WriteCapacityUnits": 1
      }
    }
  ]
}

start serverless offline

npm run start

Build

npm run build

Deploy locally

npm run deploy:local

Deploy on staging (on cloud)

npm run deploy:staging

test on cloud

npm run test

test locally

npm run test:offline

About


Languages

Language:TypeScript 83.9%Language:JavaScript 16.1%