Setting up the server code

In Chapter 3, Cloud Vision API, I demonstrated how to use an API key to make a HTTP request from our Node.js application, and in Chapter 4, Video Intelligence API, and Chapter 5, Cloud Speech API, I demonstrated how to work with the client library. We are going to continue using the client library for this section, and the next as well. We have seen how to work with these using Postman; the same can be replicated in any language.

One awesome feature of Postman is that it can convert a HTTP request to any programming language. Once we have validated a HTTP request, we can click on the Code link present just below the button to Send and Save the request. This will show a popup and a language selection, and the code for that language can be generated on the fly, as shown in the following screenshot:

Simple and easy, isn't it?

To continue development, make sure you are working on the latest code or get a copy from https://github.com/PacktPublishing/Getting-Started-with-Google-Cloud-AI-Services and then install the required dependencies by running:

$ npm install
or
$ yarn install
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.111.87