Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task 2 Serverles config and cloudFront #473

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ lerna-debug.log*

node_modules
.serverless
jspm_packages
coverage
dist
dist-ssr
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,20 @@
"test:coverage": "vitest run --coverage",
"lint": "eslint --ignore-path .gitignore --fix src",
"prettier": "prettier src --write",
"client:deploy:s3": "serverless client deploy --no-config-change --no-policy-change --no-cors-change",
"build:deploy:s3": "npm run build && npm run client:deploy:s3",
"client:deploy": "sls client deploy --no-config-change --no-policy-change --no-cors-change",
"client:deploy:nc": "npm run client:deploy -- --no-confirm",
"client:build:deploy": "npm run build && npm run client:deploy",
"client:build:deploy:nc": "npm run build && npm run client:deploy:nc",
"cloudfront:setup": "sls deploy",
"cloudfront:domainInfo": "sls domainInfo",
"cloudfront:invalidateCache": "sls invalidateCloudFrontCache",
"cloudfront:setup": "serverless deploy",
"cloudfront:domainInfo": "serverless domainInfo",
"cloudfront:invalidateCache": "serverless invalidateCloudFrontCache",
"cloudfront:build:deploy": "npm run client:build:deploy && npm run cloudfront:invalidateCache",
"cloudfront:build:deploy:nc": "npm run client:build:deploy:nc && npm run cloudfront:invalidateCache",
"cloudfront:update:build:deploy": "npm run cloudfront:setup && npm run cloudfront:build:deploy",
"cloudfront:update:build:deploy:nc": "npm run cloudfront:setup && npm run cloudfront:build:deploy:nc",
"serverless:remove": "sls remove"
"serverless:remove": "serverless remove"
},
"dependencies": {
"@emotion/react": "^11.9.3",
Expand Down
6 changes: 3 additions & 3 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ frameworkVersion: "3"
provider:
name: aws
runtime: nodejs14.x
region: eu-west-1
region: us-east-1
# setup profile for AWS CLI.
# profile: node-aws
profile: dw-developer

plugins:
- serverless-finch
Expand All @@ -19,7 +19,7 @@ plugins:

custom:
client:
bucketName: my-store-app
bucketName: my-store-app-dw-developer
distributionFolder: dist
s3BucketName: ${self:custom.client.bucketName}

Expand Down
4 changes: 2 additions & 2 deletions src/components/MainLayout/MainLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function Copyright() {
<Typography variant="body2" color="textSecondary" align="center">
{"Copyright © "}
<Link color="inherit" href="https://material-ui.com/" underline="hover">
My Store
Dawin&apos;s Awesome store
</Link>{" "}
{new Date().getFullYear()}
{"."}
Expand All @@ -37,7 +37,7 @@ const MainLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
color="textSecondary"
component="p"
>
Thank you for your purchase!
Thanks for your purchase!
</Typography>
<Copyright />
</Box>
Expand Down