To test the app, from the root of the application folder, run the following:
$ npm run dev
Alternatively, run this:
$ yarn dev
Either of these will launch our application. From the home page, click on Create Thread and create a new thread named NLP API Test or any name as you please. Once we create a new thread, navigate to the view thread page. Add a text response and click on the Reply button. This will upload the message contents to our server and then to the Cloud Natural Language API.
Once we get the response, we save that along with the other content in our database and respond with the newly created message. And this is how the final message should look:
You can try with various text replies and test the complete flow end to end.
To wrap up this chapter, we are going to push the code to Heroku.