Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Continuous Integration, Delivery, and Deployment

You're reading from   Continuous Integration, Delivery, and Deployment Reliable and faster software releases with automating builds, tests, and deployment

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781787286610
Length 458 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Sander Rossel Sander Rossel
Author Profile Icon Sander Rossel
Sander Rossel
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Continuous Integration, Delivery, and Deployment Foundations FREE CHAPTER 2. Setting Up a CI Environment 3. Version Control with Git 4. Creating a Simple JavaScript App 5. Testing Your JavaScript 6. Automation with Gulp 7. Automation with Jenkins 8. A NodeJS and MongoDB Web App 9. A C# .NET Core and PostgreSQL Web App 10. Additional Jenkins Plugins 11. Jenkins Pipelines 12. Testing a Web API 13. Continuous Delivery 14. Continuous Deployment

Building a REST service

The first thing we have to do is create a little REST service. Representational State Transfer (REST) basically means that a service is stateless and makes use of the standard HTTP verbs like GET, PUT, POST, and DELETE. That makes it a bit easier for us to write. We can create a RESTful service using Node.js and Express, pretty much like we did before. So, create a new folder and name it web-api or some such. Next, we need our package.json file, so start up a command prompt and use the npm init command. You can leave all the defaults, as we are not really going to do anything with them anyway. Next, we can install Express, the body-parser, and the command-line-args package:

npm install express --save
npm install body-parser --save
npm install command-line-args --save

We can now set up our bare bones script that allows us to at least run the application:

var...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image