Build and deploy a REST API with Deno
In this course, we will learn how to create and deploy a REST API with Deno from scratch.
5.0 46 students started
What You Will Learn
How to create an application in Deno
Integrating databases into your application
Importance of database migrations in production applications
Deploying Deno applications to production using CICD
Dockerized Deno applications
Developing using TypeScript
We will explore how to create an application using the powers of TypeScript, and learn how to traverse the Deno ecosystem which is much like the native web ecosystem. There are 5 modules that will take you from installing Deno and running your first lines of code, to working with web frameworks and databases, and in the end, deploying your application to a web server using a deployment pipeline.
Throughout this course, you will experience all the different aspects of Deno which you will need to create your own application in the future. And from this course, you will get a good feeling for if Deno is ready to be your next default for new projects.
Welcome to Build and Deploy a REST API with Deno!
Introduction to the newline guide to building and deploying a REST API using Deno.
Setting up our environment
In this lesson, we will install Deno and create our setup for the rest of the course.
Getting Started with Deno
Introducing Deno and its history
We will look at the command line interface for running Deno
In this lesson, we will look at general usage of Deno by running a file and also introduce the config file
Deno Standard Library
Learn how to use the Deno standard library and other external modules with URL imports
We will build our first server in Deno
You will learn how to make a simple token authentication in Deno
Connect to a database
Using databases with Deno
Introducing Deno databases
Using the PostgreSQL client for Deno
Using the MySQL client for Deno
Using the SQLite client for Deno
Introduction to database migrations - what, why and how
Getting started with Nessie
Get started with database migrations using Nessie
We will go through creating a migration using the Nessie CLI
We will look at how to write a migration script where we create a table
We will run our migration and learn how to roll back the migration
We will create a seed file using the Nessie CLI
We will run our seed file and populate our database
REST API Introduction
Introduction to the concept of REST APIs and why we use them
We will go through the thought process of planning an application.
Deno REST API Setup
We will create the initial project files and set up our environment
REST API Endpoints
We will create the router and look at how to test our endpoints
Databases and Nessie migrations
It's time to add Nessie! We will now initialize Nessie in our project and also spin up our development database
Time to connect our models to our database!
In this step, we will create our first data model and create a corresponding table using a migration
Creating the methods to access the database
Creating the server endpoints for the Duck namespace
Authentication and Authorization
We will look at how to set up authentication and further authorize the requests
Quack & Crumb Model
We will create two new tables using a migration and create the equivalent models
Quack Service & Controller
We will create our Quack service and controller
The last stretch! We will create our final namespace, Crumb, and connect it to our other models and our router
Now that our application is completed, we will consider some improvements and discuss alternative approaches.
We will introduce deployments and what we will learn in this module
Docker Image Creation
We will create a Docker image for our application
You will learn how to create a basic CI file for GitHub and GitLab, and run tests on them
Deploy with SSH and Git
We will deploy our application to a server using CI, SSH and git.
Deploy with Digital Ocean Apps
We will deploy our application to Digital Ocean Apps. This is by far the easiest (but most costly) approach.
Deploy with Docker
Similar to how we did it in lesson 1, we will be deploying using CI and SSH, but instead of git, we will be using Docker.
Frequently Asked Questions
Who is this course for?
This course is for any skill level, from junior to senior, who wants to learn more about Deno and how to utilize it in production.
What are the prerequisites?
What is expected of me?
The interest in learning about Deno and how to make an application using it!
What if I need help?
You can ask us questions anytime through the community Discord channel or by sending us a message.