Skip to content
/ sueop Public

[OLD] A PWA made with Polymer and the Serverless Framework to learn Korean

Notifications You must be signed in to change notification settings

jtrollia/sueop

Repository files navigation

Sueop

Sueop is a PWA demo using Polymer 1.X and Serverless 1.0. Read more here.

Stack

Polymer

# install polymer-cli
npm install -g bower
npm install -g polymer-cli

# start Polymer server
polymer serve --open

# build folders for production
polymer build

# clean assets for production
gulp vulcanize

Serverless

# download required packages
cd serverless
npm install

# deploy the service
serverless deploy -v

# check CORS
curl -H 'Origin:https://origin.com' --verbose https://endpoint.com/stage/function

AWS cli

# setup the cli
aws configure

# delete a bucket
aws s3 rm s3://my.bucket.com/ --recursive

# upload files into a bucket
aws s3 cp /tmp/foo/ s3://my.bucket.com/ --recursive

# upload a json to a dynamo table (max 25 items)
aws dynamodb batch-write-item --request-items file:///home/user/data.json

Data structure (JSON)

Vocabulary table

{ "Vocabulary": [
  {"PutRequest": {
    "Item": {
      "VocabularyKr": {"S": "낮잠 자다"},
      "VocabularyEn": {"S": "take a nap"},
      "ExampleKR": {"S": "잠시 낮잠 취한다"},
      "ExampleEn": {"S": "Take a little nap"},
      "Tags": {"SS": ["activity"]},
      "Type": {"S": "verb"}
    }
  }},

Grammar table

{ "Grammar": [
  {"PutRequest": {
    "Item": {
      "GrammarKr": {"S": "~ㄹ/을 테니까"},
      "GrammarEn": {"S": "my own duty"}
    }
  }},

History table

{ "History": [
  {"PutRequest": {
    "Item": {
      "EraName": {
        "S": "고조선 시대"
      },
      "SubEras": {
        "L": [
          {
            "M": {
              "SubEraName": {
                "S": "단군조선"
              },
              "SubEraStartDate": {
                "S": "기원전 2333년"
              },
              "SubEraEndDate": {
                "S": "기원 전 194년"
              }
            }
          },
          {
            "M": {
              "SubEraName": {
                "S": "위만조선"
              },
              "SubEraStartDate": {
                "S": "기원전 194년"
              },
              "SubEraEndDate": {
                "S": "기원전 108년"
              }
            }
          },
          {
            "M": {
              "SubEraName": {
                "S": "진국"
              },
              "SubEraStartDate": {
                "S": "기원4세기"
              },
              "SubEraEndDate": {
                "S": "기원전 2세기"
              }
            }
          }
        ]
      }
    }
  }},

Resources

About

[OLD] A PWA made with Polymer and the Serverless Framework to learn Korean

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published