Beginner API development in Node, Express, ES6, & MongoDB
Are you a mobile app developer that needs a backend API & database?
Do you have an mobile product idea?
Do you want to create your own startup?
Or do you want to become a backend developer?
This is THE course for you.
We have taught over 50,000 students how to code and so many of them have the same question, “How can I build a server for my mobile apps?”
What you will learn:
- Node
- Express
- MongoDB
- ES6 & Javascript
- API development
- CRUD & REST
- How to get an iOS app to talk to your API
- How to get an Android app to talk to your API
- Tooling & automation
- Professional coding tips & practices
- And so much more….
This course is for ANYONE – but we specifically designed it to take mobile developers to the next level by helping them build their own APIs for their apps!
API Course Intro
An overview of this node course and what you will be learning. We'll talk about node, express, MongoDB, and our general path for API development.
Learn why you would create a RESTful API and also why you would use Node js to develop the API for your iOS apps, Android apps, or web apps.
Setup for Node, MongoDB, Postman, and other API tools
A quick overview of the tools we'll need to get up and running with REST API development with node
Learn how to install an IDE - Atom so we can start writing ES6 code for our API in Node
You will install node js and the node version manager (NVM) to start working on your API
What is the point of having a node API if it doesn't have a database to talk to. In this lesson we'll learn how to install MongoDB
Postman is a client app that allows us to test our node api. You can use postman to make restful API post, update, delete, and get requests.
Node package manager is a dependency manager that makes it super easy to install node packages for your API
Hello API
In this lesson, we skip ahead and go ahead and create a simple node api just so you can see what the process looks like. At this point, we don't expect you to understand everything, the point is just to give you a glimpse of where we are going using node, express, and es6
JavaScript Basics
In this lesson, we define ECMA, ECMAScript, ES6, ES2015 and what this all has to do with JavaScript and Node.js for API
Creating our REST API
In this introduction, we talk about what we are going to build with node in this section and where we will end up.
In this lesson, we set up the project skeleton so we can build our REST API. We install some of the dependencies we will need with node & npm and set up tools such as Babel so that we can use ES6 features such as `import` with Node.js
In this lesson, we start building our app, configure and connect to our Mongo Database. We start off with a very simple restaurant API in node that only has a name of each restaurant. We will refactor and add features after we get the basics down.
In this lesson, we set up our first API node endpoint. Since we have no data in our database initially, we make this a POST request so that we can add a restaurant.
In this lesson, we now have some data in our database, so we create another node endpoint so that we can retrieve data. In this case, we retrieve all restaurants listed in the database as well as a single restaurant by its ID.
In this lesson, we set up another nodeendpoint so that we can modify an existing record (restaurant) in the database.
In this lesson, we set up one final node endpoint so that we can delete a particular restaurant by its ID.
In this very in depth lesson, we start with the basics we have created and then refactor to make this a more robust node API. We first refactor from a restaurant api and turn it into a foodtruck api. We add properties into our data model, as well as add a second data model and show you how to store references in each, so that we avoid nested data in our database as much as possible.
Authentication and Security
In this lesson, we go through the process of adding another data model so that we can incorporate Authentication/Authorization into our API in node.
In this lesson, we setup authentication middleware using passport so that we can authenticate users. We also set up json web tokens, so that we can pass a token back to the user to be used for secured endpoints. Finally we walk through the process of securing some of our node endpoints while leaving others open for unauthenticated use.
Deploying Our Node API To A Live Server
An overview about how we will deploy our node server so we can have a public API
In this lesson, we spin up a Digital Ocean Droplet (Ubuntu 16.04) and get the basic server set up and running. Having our own server will allow us to have a Node server that is running continually.
In this lesson, we add a domain name to our droplet, upload our Node API to the server and get everything up and running.
In this lesson, we set up Nginx to act as a proxy for our Node API. We continue by getting a free ssl certificate and setting it up so that we can use secure https with our API.
Creating an iOS app to make use of our Node REST API
In this introduction, we discuss the iOS client application we will be building throughout this section.
In this lesson, we make a few small adjustments to our API to structure things in a better way for our clients.
In this lesson, we begin our application by creating our data models for the api data we will be interacting with.
In this lesson, we construct a data service to interact with our api. This will allow us to keep our data and presentation logic separate.
In this lesson, we construct an auth service to handle user registrations and logins.
In this lesson, we begin building out our user interface by creating our Main ViewController and hooking it up to our Data Service.
In this lesson, we create a LogIn ViewController in the form of a xib file and learn how to load it up to handle registration and login.
In this lesson, we create another ViewController to add the ability to add new Food Trucks to our database through our api.
In this lesson, we create a Details ViewController to show the details of a single Food Truck that was selected from our main table view. We also add a map in this controller so that we can show the exact location of the Food Truck.
In this lesson, we add a ViewController to show reviews for a specific Food Truck
In this lesson, we wrap up this section by adding the ability to add new reviews for a Food Truck.
Creating an Android app to make use of our Node REST API
In this section we will be building an Android client app with the API you have built.
Create the FoodTruck data model and make your first API call.
Use a recycler view to display your FoodTrucks.
Create a new activity to display the FoodTruck details.
Continue creating the detail view.
Create and execute the API call to retrieve reviews.
Use a recycler view to display your reviews.
Use Login Screen template to build a Login Screen.
Create and execute the Register API call
Create and execute the Login API call.
Create and execute the API call to add a new review.
Create and execute the API call to add a new FoodTruck.