Chapter Exercise

In this exercise, you’ll get a chance to expand the functionality of newman, the automated testing app we used in Chapter 9, Testing APIs. This time, along with using the newman library to test our package, you’ll get a chance to add an additional step that will automatically deploy your package to the Heroku cloud platform.

In this exercise you’ll need to update the norman utility to handle continuous deployment. There’s a copy of the source code for this utility in the utilities folder of the downloadable source code associated with this book.[94]

To update the utility, you’ll need to go to the code/deploying/exercise/before/norman folder and open the index.js file to locate the commented section with the title add deployment command here. Modify the shell.exec(...) command on the subsequent line to include the correct git command needed to fire off Heroku’s continuous delivery process. (You should need just four keywords on a single line to make this work.)

Once you have the code updated, run the same command as before (norman assets/api-onboarding,postman_collection.json). If all goes well, you should see your project pushed into production again on the Heroku platform.

See Appendix 2 (Solution for Chapter 11: Deploying APIs) for the solution.

..................Content has been hidden....................

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