The out-of-box web chat UI sample does not allow testing custom chat channels; it only allows testing the web
channel type. This sample solution deploys a serverless function to create a custom chat channel that the UI consumes without further modification necessary.
- First, to deploy the serverless function:
cd serverless-functions
npm install
twilio serverless:deploy
This will return the function URL. Keep a note of this to use for step 3.
- For the webchat UI, install all dependencies by running:
cd ..
npm install
- Copy webchat-appConfig.sample.js in public/assets folder and configure accordingly to use your Twilio account and the function URL from step 1.
cp public/assets/webchat-appConfig.sample.js public/assets/webchat-appConfig.js
- Start Flex UI by running:
npm start