Web Services with Node
Create robust RESTful Web Services with Node.js, MongoDB, and Express.js
Web APIs allow developers to build web pages and web based applications (known as "mashups") using data from multiple online sources. Representational State Transfer (REST) is a simple yet powerful software architecture style to create lightweight and scalable web services. When building RESTful services, it is really important to choose the right framework. Node.js, with its asynchronous, event-driven architecture, is exactly the right choice for building RESTful APIs.
This course will teach students to create scalable and rich RESTful applications based on the Node.js platform. Students will be introduced to Node.js as well as its package handler, npm in order to install and manage project dependencies.
The course will begin with a quick overview of Node.js (please note that this is not an in-depth Node.js course), followed by understanding the key principle that makes an HTTP application a RESTful-enabled application. After writing a simple HTTP request handler, students should be able to create Node.js modules and first the RESTful API will be using static data, while later on in the course students will explore using a NoSQL database, MongoDB for data storage and they’ll learn how to dynamically get data out from the database and display that via the RESTful API. During the course students will get familiar with the basics of REST API design, including but not limited to HTTP status codes and responses as well as get an introduction to ExpressJS – a popular web server for Node.js. Lastly, students will be able to add authentication using JWT (JSON Web Tokens) to secure endpoints in the API.
What you'll learn-and how you can apply it
- Explore the new features of Node.js 10, Express 4.0, and MongoDB
- Create rich and scalable RESTful API solutions from scratch
- Integrate MongoDB in your Node.js application to store and secure your data
- Secure your services with NoSQL database integration within Node.js applications
This training course is for you because...
- If you are keen to enrich your development skills to create server-side RESTful applications based on the Node.js platform then this course is for you. It will teach you the fundamental of REST API design in a pure Node.js environment using some of the most utilized packages within the ecosystem.
- The knowledge that you’ll gather during this course can be put down into practice straight away after the course and will accelerate your ability to develop robust web services.
- The course will keep extensibility and scalability in mind, so you can immediately start to create REST APIs that scale.
- Basic web development knowledge
- Basic understanding of NoSQL
Materials, downloads, needed in advance:
- Node.js 10 installed (https://nodejs.org/en/download/current/)
- MongoDB installed (https://www.mongodb.com/download-center?jmp=homepage#community)
- Favorite Text Editor / IDE installed
About your instructor
Tamas Piros is a director at Full Stack Training and a web developer turned technical instructor, curriculum developer, developer evangelist, and Google Developer Expert in web technologies. He has more than a decade of experience working with large, prestigious organizations. He’s delivered training classes for clients and regularly conducts presentations and workshops at conferences and meetups all over the world.
The timeframes are only estimates and may vary according to how the class is progressing
DAY 1 – 4 hours
- Section 1: Getting the environment setup
- Section 2: Introduction to Node.js & npm
- http module, fs module, path module
- debug and development tools – Winston, nodemon
- Section 3: Introduction to Express
- Setup and configure express
- Create a single API endpoint
- Handle static files
- Use the Router object
- Create multiple endpoints for HTTP methods
- Query and route parameters
- Creating a static API with Express with the appropriate endpoints
DAY 2 – 4 hours
- Section 4: Using MongoDB
- Load data to MongoDB
- Query data in MongoDB (Basic query types)
- Section 5: Recreating the API to use data from MongoDB
- Update the API from Day 1 to display data from MongoDB
- Section 6: Advanced ExpressJS
- Understanding Middlewares
- Section 7: Adding authentication to the API (JSON Web Tokens)
- Securing a single endpoint with JSON Web Tokens