In this video, learn how to store Twitter’s data in your database to minimize the use of Twitter’s API.
- [Instructor] Hello, this is the last video…of the section, Consuming a RESTful API.…In the previous video, we looked at different…databases and I chose to use MongoDB.…In this video, we are going to take a look at turning…our code to resemble our sample application.…This involves modifying routes…and adding views and static files.…Then, we will access MongoDB using…the official Node.js module.…Let's open the code files for this video.…We can see that there are two new folders and one new file.…
Storage.js has a code for accessing the database.…Public has our static files,…we can find two style sheets and an image.…Views has the two views for the main page…and the login page.…The login view is just static HTML.…The main page, on the other hand, takes in an array…of friends and renders them in a list.…To turn our code from the last video into one that…resembles our Twitter notes application,…we have to make a few changes.…
First, we deleted the route handlers for…/delete, /search, /friends, and /oldfriends.…We added two new route handlers.…
This Node.js course gives you an overview of a RESTful API and the logical steps of creating one. It explores three different APIs, focusing on their similarities and differences and how to effectively implement one. Instructor Saleh Hamadeh starts off by defining APIs, showing how they can be built on top of HTTP and listing the properties that make an API RESTful. Learn how to develop Twitter Notes, a sample web application that lets users leave notes for their Twitter friends. Use Twitter's API to implement a login flow and then design a web API. Additionally, get a closer look at several other real-world APIs, and learn some best practices to keep APIs secure, maintainable, and efficient.
- Identifying REST resources
- Setting up the development environment
- Consuming a RESTful API
- Creating an OAuth login request
- Getting an access token
- Saving data in MongoDB
- Building a RESTful API
- Testing user-perceived performance
- Looking at APIs in the real world
- Best practices for building RESTful APIs