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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": [ | |
"s3:GetObject" | |
], | |
"Resource": [ | |
"arn:aws:s3:::{YOUR_S3_BUCKET}/public/*" | |
], |
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
import json | |
def lambda_handler(event, context): | |
if event['httpMethod'] == "GET": | |
return getItem(event) | |
if event['httpMethod'] == "POST": | |
return createCart(event) | |
def getItem(event): |
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
functions: { | |
UserLogin: { | |
handler: `src/handler.main`, | |
environment: { | |
USERS_TABLE: { Ref: 'UsersTable' }, | |
}, | |
iamRoleStatements: [ | |
{ | |
Effect: 'Allow', |
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 defaultRequest = { | |
body: null, | |
headers: {}, | |
multiValueHeaders: {}, | |
httpMethod: "", | |
isBase64Encoded: false, | |
path: '', | |
pathParameters: null, | |
queryStringParameters: null, | |
multiValueQueryStringParameters: null, |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Serverless Offline", |
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
apiURLBase: { 'Fn::Join': [ '', [ 'https://', { 'Ref': 'ApiGatewayRestApi' }, '.execute-api.${self:provider.region}.amazonaws.com/${self:provider.stage}' ] ] } |
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
if [ "$#" -ne 1 ]; then | |
echo "Usage : ./build.sh lambdaName"; | |
exit 1; | |
fi | |
lambda=${1%/}; // # Removes trailing slashes | |
echo "Deploying $lambda"; | |
cd $lambda; | |
if [ $? -eq 0 ]; then | |
echo "...." |
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
activeGender(gender) { | |
let men = document.querySelector(".menTab").classList; | |
let women = document.querySelector(".womenTab").classList; | |
gender = this.state.gender === gender ? "" : gender; | |
this.setState({ gender }); | |
if (gender === "mens") { | |
men.add("active"); | |
women.remove("active"); | |
} else if (gender === "womens") { | |
women.add("active"); |
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 Landing = () => { | |
return ( | |
<div className="center background-img"> | |
<div className="center-box"> | |
<div className="white-box hpTitle"> | |
<h1>Where will your shoes take you?</h1> | |
</div> | |
<div className="row"> | |
<div className="col l3 offset-l2 m5 offset-m1 s10 offset-s1"> | |
<Link to="./products/womens"> |
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
addClickTracking() { | |
const trackingSettings = new helper.TrackingSettings(); | |
const clickTracking = new helper.ClickTracking(true, true); | |
trackingSettings.setClickTracking(clickTracking); | |
this.addTrackingSettings(trackingSettings); | |
} |