Giter VIP home page Giter VIP logo

frontendmasters's Introduction

Frontend Masters Course: Build Go Apps that Scale on AWS

This is a companion repo containing the code solutions for the Build Go Apps that Scale on AWS course on Frontend Masters

Setup Instructions

In order to complete this course, you should create an AWS account, install Go, the AWS CLI and the AWS CDK.

Install Go (preferably version > = 1.18)

Install the AWS CLI

CDK installed (use CDK command)

  • Download CDK
  • Make sure you bootstrap your environment with:
cdk bootstrap aws://ACCOUNT-NUMBER/REGION

Here's more info about boostrapping the CDK. Your ACCOUNT-NUMBER and REGION can be found the AWS console.

CloudWatch Logs

Some users received CloudWatch logging errors during the API Gateway lessons. Logging to CloudWatch is not required, but you can prevent these errors by following these steps.

If you dont want logging, you can add CloudWatchRole: jsii.Bool(true) to the RestApiProps object.

Gopls Extension

Download the Gopls Extension for your editor

Code Solutions

All code for this course is written from scratch. The branches in this repo are code checkpoints for sections within the course:

  • The main branch contains everything you need for the Go Basics section
  • The chapter_0 branch contains the solution to the AWS & CDK section
  • branch chapter_1 branch contains the solution to the DynamoDB & Insertin Users section
  • branch chapter_2 branch contains the solution to the AAPI Gateway & Authentication Routes section
  • branch chapter_3 branch contains the solution to the JSON Web Tokens & Protected URLs section

Note: The code in the above branches may not match what was coded during the course. See the live_workshop branch for the final course code.

cURL Commands

At the end of the course, the API routes are tested with cURL commands. You can copy/paste these commands instead of typing them out.

Register

curl -X POST AWS_SERVER_URL/register -H "Content-Type: application/json" -d '{"username":"USERNAME", "password":"PASSWORD"}'

Login

curl -X POST AWS_SERVER_URL/login -H "Content-Type: application/json" -d '{"username":"USERNAME", "password":"PASSWORD"}'

Access Protected Route

curl -X GET AWS_SERVER_URL/protected -H "Content-Type: application/json" -H "Authorization: Bearer JWT_TOKEN"

Remove infrastructure create with CDK

To remove the infrastructure created with the AWS CDK, run cdk destory.

Before running cdk destroy, you'll want to ensure you've added RemovalPolicy: awscdk.RemovalPolicy_DESTROY in the awsdynamodb.TableProps.

frontendmasters's People

Contributors

dtauer avatar melkeydev avatar sallescosta 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.