Git Product home page Git Product logo

shop-react-redux-cloudfront's Introduction

React-shop-cloudfront

This is frontend starter project for nodejs-aws mentoring program. It uses the following technologies:

Available Scripts

start

Starts the project in dev mode with mocked API on local environment.

build

Builds the project for production in dist folder.

preview

Starts the project in production mode on local environment.

test, test:ui, test:coverage

Runs tests in console, in browser or with coverage.

lint, prettier

Runs linting and formatting for all files in src folder.

client:deploy, client:deploy:nc

Deploy the project build from dist folder to configured in serverless.yml AWS S3 bucket with or without confirmation.

client:build:deploy, client:build:deploy:nc

Combination of build and client:deploy commands with or without confirmation.

cloudfront:setup

Deploy configured in serverless.yml stack via CloudFormation.

cloudfront:domainInfo

Display cloudfront domain information in console.

cloudfront:invalidateCache

Invalidate cloudfront cache.

cloudfront:build:deploy, cloudfront:build:deploy:nc

Combination of client:build:deploy and cloudfront:invalidateCache commands with or without confirmation.

cloudfront:update:build:deploy, cloudfront:update:build:deploy:nc

Combination of cloudfront:setup and cloudfront:build:deploy commands with or without confirmation.

serverless:remove

Remove an entire stack configured in serverless.yml via CloudFormation.

Task 2.1 Manual Deployment

In the AWS Console create and configure an S3 bucket where you will host your app (follow instructions in training materials). Build and manually upload the MyShop! app to the created S3 bucket. Check if the app is available through the Internet over http://{your-bucket-name}.s3-website-{aws-region}.amazonaws.com . Create a CloudFront distribution for your app as it was described in training materials. Check your S3 bucket policy changes. Check if the app is available through the Internet over given CloudFront URL. Make some minor but visible changes in the app, build and upload them to your bucket, and create CloudFront distribution invalidation. Task 2.2 Automated Deployment

Add and configure serverless and serverless-finch plugin. Add necessary npm script(s) to build and deploy your app from your machine in an automated way. Check if everything works correctly for you. Here's a Demo repo as an example. NOTE: After uploading an application's build to the S3 bucket you need to manually create a CloudFront invalidation.

Destroy the created AWS infrastructure (S3 bucket and CloudFront distribution) from the previous part and steps. Make sure nothing is left. Add and configure serverless-single-page-app-plugin as it is implemented in the demo repository. Add necessary npm script(s) to build, upload to your S3 bucket, and invalidate CloudFront cache from your machine in an automated way. Check if everything works fine and all changes appear on the Web. NOTE: Now that you have this plugin you don’t need to manually create CloudFront invalidations any more.

Task 2.3 Store the links to CloudFront URL and S3-website in README.md file. Commit all your work to separate branch (e.g. task-2 from the latest master) in your own repository. Create a pull request to the master branch. Submit the link to the pull request for crosscheck Evaluation criteria (70 points for covering all criteria) S3 bucket has been created and configured properly. The app has been uploaded to the bucket and is available though the Internet. Nothing else has been done. (Link to S3 bucket/website is provided. There is no Pull Request in the YOUR OWN frontend repository.) In addition to the previous work a CloudFront distribution is created and configured properly and the site is served now with CloudFront and is available through the Internet over CloudFront URL, not S3-website link (due to changes in bucket’s policy...). (Link to CloudFront website is provided. S3-website shows 403 Access Denied error. There is no Pull Request in the YOUR OWN frontend repository.) Additional (optional) tasks 30 - Serverless-finch and serverless-single-page-app plugins are added and configured. The app can be built and deployed by running npm script command. (Link to CloudFront website is provided. PR with all changes is submitted in the YOUR OWN frontend repository and its link is provided for review.)

What was done:

Link to S3 bucket/website: http://my-shop-practice.s3-website-eu-west-1.amazonaws.com/ Link to CloudFront website: https://d2wukvticafb1c.cloudfront.net/

S3 bucket has been created and configured properly. The app has been uploaded to the bucket and is available though the Internet. Link to S3 bucket/website is provided. CloudFront distribution is created and configured properly and the site is served now with CloudFront and is available through the Internet over CloudFront URL. Link to CloudFront website is provided. S3-website shows 403 Access Denied error.

Additional (optional) task:

  • Serverless-finch plugin is added and configured. The app can be built by yarn script command. (Link to CloudFront website is provided. PR with all changes is submitted in my OWN frontend repository and its link is provided for review.) Not done:
  • serverless-single-page-app is not added, automatic deploy fails due to authorisation error.

shop-react-redux-cloudfront's People

Contributors

alexandrli avatar sergeykovalchuk avatar ilya-valasiuk avatar gultyayev avatar olgapoddubko avatar vladshcherbin avatar rise2semi avatar dzmitry-varabei avatar hermanbilous avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.