🔙 🏠 Workshop Home Page

This pre-work will walk you through setting up some tools and services that we'll use in the workshop. We won't be doing any coding here, but we will download and run a small piece of sample code to confirm that everything is set up and running correctly.

By the end, you'll have all the components of a test environment so we can start working on Trustly integrations as quickly as possible in the workshop. After each step, you'll be prompted to check the leaderboard back on the home page to confirm your progress.

Overview

<aside> ⬇️

Advanced user? Skip ahead.

If you’re somewhat familiar with APIs and basic JavaScript programming skip down to the 🔗 Steps To Complete.

</aside>

By going through the steps of this guide you will:

  1. Install a code editor, also known as a text editor, not unlike Microsoft Word or Apple Pages, but for editing and managing code instead of other kinds of texts. Other basic principles like opening multiple files inside a project folder (directory) still apply.
  2. Install an API client for testing out APIs. Technically your web browser is an API client but it’s generally only used for GET requests, and it expects HTML to be returned instead of just data, so that it can make a pretty UI. We’ll need a client that can make all kinds of “requests” and show us the data in a “response” in a user friendly way.
  3. Install a “runtime” or a tool for running code on your computer. All computers come with the ability to run some kinds of code but not all languages. We’ll be using JavaScript in our sample code. JavaScript is the language of the web and runs on all web browsers. But to run it on our laptop we’ll need a runtime. We’ll use the popular Node.js runtime.
  4. Finally, we’ll download the sample code to be used during the workshop and use our runtime to test it!

🙋🏻 Help

💬 If you have any questions at any time, please:

🕰️ Book a spot or just show up to office hours with me during the week of November 11, 2024 → November 15, 2024

Steps to Complete

🛠️ Setup Tools

1. Install VS Code

Visual Studio Code (VS Code) is a popular code editor. While you can technically write code in any text editing program, VS Code has useful features and plugins that make developers' lives easier. We'll use some of these features during the workshop, such as tools for interacting with APIs and debugging, which will make writing and managing code much more efficient.

Instructions:

  1. Download and install Visual Studio Code.
  2. Install an API Client Plugin for VS Code such as RapidAPI Client.
    1. If you already have and use Postman, you can use that instead.
  3. Test your API Client
    1. Use the API Client Plugin to make a GET request to confirm it’s working. We’ll use a silly free API to a retrieve a random Chuck Norris joke:

      1. Under “Requests” click the + sign
      2. Set the method to GET if not already set
        • Click to show screenshot
      3. Set the URL to: https://api.chucknorris.io/jokes/random
      4. Click “Send”
      5. Read the response and laugh like this →😂 …or not, they’re not all that great.
    2. Then, make a POST request to our workshop progress tracker API to create a “user” record for yourself.

      1. Create a new “Request” using the + button

      2. Set method to POST

      3. Set the URL to https://trustly-product-workshop.up.railway.app/user

      4. Beneath the URL select Body then select JSON

      5. Copy the object below, change the name to your name and paste it into the text input.

        {
           "name": "Luke Vance"
        }
        
      • Screenshot
    3. Click “Send” and take a note of the “User ID” you were assigned in the response. Then check out the leaderboard to see if your name showed up! (You should also have 1 point shown on the right)

2. Sign Up for GitHub