Edupala

Comprehensive Full Stack Development Tutorial: Learn Ionic, Angular, React, React Native, and Node.js with JavaScript

API in Express

An application program interface [API] is code that allows two software programs to communicate with each other. That makes it possible for applications to share data and take actions on one another’s behalf without requiring developers to share all of their software’s code.

In the simplest terms, APIs are sets of requirements that govern how one application can talk to another.
APIs do all this by “exposing” some of a program’s internal functions to the outside world in a limited fashion.

In simple term, API’s are the ways to one piece of code to communicate with other code regardless of distance.

We will build a simple API that will generate an even number between two range.  While requests the API we must send a minimum and maximum range for an even number as http://localhost:3000/even/10/20. Where  10 and 20 are a minimum and maximum range where we will be generating the even numbers. Our web app will parse those range from requested URL and will generate the range in an array even and send it back to the client with array object as in JSON format.

API in Express

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top