App Setup
First, let's make a new file, app.js
, and move our App component over, making sure to export it.
app.js
And then import it in our index.html
file:
index.html
Hit refresh on the client—you should still see your app rendering its greeting.
#
API clientNow we'll add a small API client—some objects that will make it easy for us to talk to Aft.
Make a new file, aft.js
, and add the following.
aft.js
The use of Proxy isn't really necessary, but it gives us a nice looking syntax for making API calls or RPCs to Aft. This short snippet is all you'll need in your app to use every bit of functionality Aft has to offer.
Okay, nice work! Up next, we'll make our login UI and sign in to our app.