
Learn to build a to-do app rest api in Deno with jwt authentication and CRUD operations. Test with Postman and sign up to access protected routes.
Download visual studio code on Windows or Mac, install it, and accept the agreement to complete setup. Download Postman from the official site and install it to test your API.
Learn how the back end and front end communicate via request-response cycles, APIs, and REST. Explore databases, languages, frameworks, and cloud infrastructure like IaaS, PaaS, SaaS powering scalable back ends.
Install Deno on Windows using PowerShell, or run the macOS or Linux command shown, then open a Deno project in VS Code and install the Deno extension.
Set up a deno project by creating a main.ts, verifying nano and deno commands, initializing the project, and preparing to build an oak server in the next video.
Create an oak server with the dino middleware, wiring a router for an http server in main.ts, and run the app on a defined port with Deno.
Create a routes folder with routes.ts in a Deno Oak server, export default router, import it in main, and wire app.use(router.routes()) and app.use(router.allowMethods()) to expose all routes.
Connect a Deno REST API to a MongoDB database by creating an Atlas project, configuring a cluster, authenticating with a username and password, and using the MongoDB URL in code.
Create and verify the database name Dino in db.ts and in MongoDB, then add a collection named task and pass the same database name to client.database.
Create a user model by adding a user.ts file in a model folder, defining a schema with objectId, username, and password, and exporting the interface.
Recap how to set up a Deno rest api: create server, port 3000, a welcome route, router, mongodb connection, and a user model.
Implement a Deno signup endpoint that creates a user in the database, returns 201 with the user id, and hashes the password using bcrypt.
Create a Deno authentication route that validates users, hashes passwords with SHA-512 via bcrypt, and issues a JWT using a crypto key, enabling /api/sign in authentication.
Create a task model and route to add tasks via a rest API, persisting id, name, and is complete boolean in MongoDB with Deno and Oak.
Building an API is intimated at first but trust me it never been so easy. In this course, I will show you who you can build your first api within minutes. all you need a basic understanding of javascript/Typescript and if you have knowledge of nodejs than it is more than enough and you will be amazed how quickly and easily you can build your first API from Scratch.
Just follow along with me. I will holding your hand through the course. at the end of the course you have a solid understanding of Deno framework and how to use it to build a fully functional authentication API that can you use a foundation to any project.
This course contain 16 section contain 20 video which over 3 hrs 18 min long. you can watch at your own pace and at any point you get lost you can absolutely send a message. I Will happy to answer all your queries.
What we are building...
First we install Deno, setup deno oak server, create user & task model , create signup and login API, hash password, generate JWT authentication and authorization. After that we perform crud API operation on todo App. After each API we test our API with Postman. setup environment variable, setup denon which is nodemon of Deno.