🔙 to the home page

3️⃣ Back to part 3

Don't worry too much about all the files here — we're just going to make sure everything runs smoothly, and then we'll use this demo app to make API calls instead of using an API client like you did before.

When we get to the workshop, we’ll work together to use some of the basic building blocks in this app to build a Trustly app, but for now you’re just going to run the app and enter some data. The app will take care of calling the backend APIs that you called manually earlier.

Instructions:

  1. In the Terminal where you first ran npm install start the app using:

    npm start
    
  2. Once the app is running, go to http://localhost:8080/ in a web browser.

    🏓 if you used pinggy and got an error like port 8080 currently in use make sure you closed or stopped the http-server see step 5.6

  3. You should see a very basic website with a form and a button on it. You should be able to easily tell what the app is going to do: submit data from the form to the /user/{id}/webhook API we called in Step 5.

  4. Check that ngrok is still running in your terminal window. If not, just repeat the step in

  5. Enter your User ID, Ngrok URL, and a number of seconds less than 30.

  6. If it worked, you should see a success message!

  7. Wait the number of seconds and then look at the ngrok log in your Terminal or the web interface (http://127.0.0.1:4040) …you should see that our app responded to the webhook so we’re no longer getting an error. I told you we’d fix it!

  8. And finally…check the scoreboard!

    🏓 First check the Terminal where pinggy is running. If the webhook was received you should see POST 200 OK /webhook-listener in the log. You should now have received your bonus point that you missed back in step 5.

Untitled