You are here

How To Provision An API With ExpressJS And MongoDB

In this four-part tutorial Jeff Douglas, writing for, has showcased how to build a simple banner management application using Flux as the architectural pattern for building with React. The API being created here will be provisioned using ExpressJS and MongoDB as users are guided through building the model and defining the routes, with all relevant code provided. The React components from the first post are then ready to be implemented with the API, which will be covered in the next and final post.

While this tutorial discusses provisioning an API with ExpressJS and MongoDB, it is important to understand the tools that were used to create the banner management application that is the core of this project. Interest in React is building yet there is still some uncertainty surrounding what it is.

Maintained by Facebook and Instagram who call it “a JavaScript library for creating user interfaces”, it has drawn some comparisons with AngularJS. However, rather than using templates, React breaks UIs into individual, reusable components that use a full-featured programming language to render views, which has led to its label as the V in MVC.

React contributor Peter Hunt stated on Quora, “To set the record straight: React components are far more powerful than Angular templates; they should be compared with Angular's directives instead,” (directives being Angular’s method for creating custom elements). This is accompanied by super-fast rendering thanks to a concept called the Virtual DOM that monitors state changes and selectively renders only updated DOM nodes. With its composable components and focus on being simple and declarative, React makes it possible to build large applications with data that changes over time.

Be sure to read the next Application Development article: Google Offers Updates on Places API for iOS

Original Article

Building with React & Flux: Banners API