Sueop is a PWA demo using Polymer 1.X and Serverless 1.0. Read more here.
# 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
# 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
# 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
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세기"
}
}
}
]
}
}
}},