Building APIs with Node.js
Greg Brail, Scott Ganyo and Kevin Swiber
Overview
•
•
•
•

Introduction to the stack
Building a simple API
Deploying it
Adding API Features using Volos

2
Introduction to the Stack

3
Node.js Stack
• API Middleware
– Volos

• Web app and API framework
– Argo
– Express
– others

• Runtime
– Node.js
– Trireme
Node.js
•
•
•
•

Server-side platform for JavaScript
Support for HTTP(s)
Scalable and fast
Huge third-party community
Argo
• A framework for APIs
• A framework for proxies
• Middleware support

6
Volos
• Node.js modules for API management
–
–
–
–

OAuth
Quota
Cache
more to come

• MIT License
• Multiple back ends

7
Demo: Building a Simple API

8
Apigee Support
Node.js Support in Apigee
• Deploy Node.js applications to Apigee
– Directly from UI
– From source code

• Third party module support
• Combine with other policies
Using the Apigee UI
• Demo…

11
Deploying to Apigee
• Demo…

12
Volos

13
Introduction to Volos
• OAuth 2.0
– Add OAuth 2.0 authorization support to any API
– Redis back end
– Apigee back end – makes API calls to Apigee

• Quota
– Count API calls by time and by any identifier (API key, etc.)
– Local back end (in memory)
– Apigee back end

• Cache
– Cache arbitrary data
– Local back end (in memory)
– Redis and Apigee in the works

• More to come
– Open source…
Volos Modules
• Add a quota to the app using the volos-quota module
• Deploy it to Apigee

15
Demo: Basic Volos App

16
Demo: More Complete App
We would love your feedback!
Don’t forget to fill out the session’s
survey – found in the session details
on the conference app
#iloveapis

Thank you

Building Production-Ready APIs With Node.js