Skip to content

In this tutorial, we'll cover how to build a Deno API that supports CRUD operations and stores data in a MongoDB database. The example API will run on an Oak middleware framework that will include routes to create, retrieve, update, and delete documents in the database.

Notifications You must be signed in to change notification settings

wpcodevo/deno-mongodb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to Setup and Use MongoDB with Deno

When it comes to learning a new framework or language, the first thing that comes to our mind is creating a Todo app that has all the basic CRUD functionalities. So in this article, we will create a Todo CRUD RESTful API in a Deno environment that runs on an Oak middleware server and uses a MongoDB database.

How to Setup and Use MongoDB with Deno

Topics Covered

  • What is Deno Oak Middleware Framework?
  • Installing Deno
  • Setup Oak Middleware and Routing
  • Setup MongoDB Server with Docker
  • Connect Deno to MongoDB Server
  • Create the MongoDB Database Models
  • Create the Request Validation Schemas
  • Create the Route Controllers
    • Add the Dependency Imports
    • Create Document Controller
    • Update Document Controller
    • Read a Single Document Controller
    • Read All Documents Controller
    • Delete Document Controller
    • Export the Controllers
  • Create/Merge the API Routes with Oak
  • Test the Deno API with Postman
    • Create a new document
    • Update an existing document
    • Get a single document
    • Get all the documents
    • Delete a document

Read the entire article here: https://codevoweb.com/setup-and-use-mongodb-with-deno

Articles in this Series:

1. How to Setup and Use MongoDB with Deno

How to Setup and Use MongoDB with Deno

2. How to Set up Deno RESTful CRUD Project with MongoDB

How to Set up Deno RESTful CRUD Project with MongoDB

3. Authentication with Bcrypt, JWT, and Cookies in Deno

Authentication with Bcrypt, JWT, and Cookies in Deno

4. Build a Complete Deno CRUD RESTful API with MongoDB

Build a Complete Deno CRUD RESTful API with MongoDB

About

In this tutorial, we'll cover how to build a Deno API that supports CRUD operations and stores data in a MongoDB database. The example API will run on an Oak middleware framework that will include routes to create, retrieve, update, and delete documents in the database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published