This topic introduces Apigee Edge support for Node.js.
If you are new to Node.js, there are many excellent learning resources available online including books, videos, blogs, and the nodejs.org website. From this point on, we assume you are familiar with Node.js and are exploring how to integrate Node.js apps with Apigee Edge.
Node.js on Apigee Edge adds more programmability to the Edge API platform. Running on Edge, Node.js apps take advantage of Edge's enterprise-grade cloud operations like traffic management, security, deployment tools, revision control, logging, and analytics. Furthermore, you can leverage thousands of third-party Node.js modules in your APIs.
Enterprise developers have found many creative ways to integrate Node.js applications into the Edge platform. Some common use cases include:
- Build highly customized standalone APIs and backend services.
- Build backend logic for Advanced API Services to leverage cloud data storage and management, user management, push notifications, and more.
- Solve complex orchestration and mobile optimization problems using Apigee policies with the advantage of a scriptable target endpoint.
- Build composite services and mashups.
- Rapidly develop prototypes of new APIs using frameworks like Express, Argo, and Usergrid.
For a more detailed discussion of Node.js on Apigee Edge, check out this video (53 minutes). The video covers the basics of building a Node.js app and deploying it to Apigee Edge. It discusses options for building new APIs in Apigee and offers examples of orchestration and transformation tasks coded in Node.js.
We recommend that you download and try out our Node.js API proxy sample code. You can access these Node.js samples here in the Apigee Edge API Services samples repository on GitHub: https://github.com/apigee/node-samples. For more information on downloading Apigee samples, see Using the samples.
The Node.js repository contains a number of basic examples from deploying a simple Hello World! server to an employee database API that leverages a cloud-based datastore.
We also recommend that you explore the Node.js samples in the API proxy cookbook. The cookbook samples focus on common problem-solving patterns related to API development, like writing backend Node.js logic to interact with Advanced API Services. See, for example, Building a BaaS application with Node.js.
Instructions for deploying and calling each sample API proxy are provided in the README file that comes with the sample. You can also find brief deployment instructions here: Deploying and testing samples.
Now that you know a little about Node.js support in Apigee Edge, it's time to see Node.js on Edge in action. In the next topic, Getting started with Node.js on Apigee Edge, we'll show you how to proxy a very simple "Hello World" Node.js app on Apigee Edge using the management UI. Later, we'll show you how to deploy Node.js apps directly from your development machine to Edge using the command-line interface.