JavaScript

Create the UI

Create the user interface for your web chat application.

The following HTML defines 2 <section> areas that you will use to display:

  • Buttons to either log in as Alice or Bob
  • The chat interface including the feed of messages along with a text area and button to send messages

The web page loads two scripts once the page body has rendered:

  • The vonageClientSDK.min.js file from the @vonage/client-sdk Node modules folder
  • The chat.js file that will contain your application's code. Create this empty file in the project's root directory

Create a file named index.html in your project directory with the following contents: