This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# POST endpoint /update/{productId}. | |
# Api Gateway will send the productId to an SQS Queue. | |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: >- | |
api-to-sqs | |
Transform: | |
- AWS::Serverless-2016-10-31 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# POST endpoint /update with a JSON payload like {"products": ["123", "456"]}. | |
# Api Gateway will send this payload to an SQS Queue. | |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: >- | |
Api Gateway as a proxy to SQS. | |
Transform: | |
- AWS::Serverless-2016-10-31 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CACHE_VERSION = 'cache_version_1'; | |
self.addEventListener('install', (event) => { | |
console.log('service worker install'); | |
if(!caches in self) { | |
return; | |
} | |
event.waitUntil( |