This repository contains a simple CRUD (Create, Read, Update, Delete) application built with Deno 2.0 and MongoDB. It demonstrates how to set up a basic HTTP server with routing capabilities and interact with a MongoDB database using the official MongoDB driver.
- Basic TypeScript knowledge
- Understanding of MongoDB concepts
- Familiarity with RESTful APIs
- Deno 2.0 installed
- MongoDB Atlas account (or a local MongoDB instance)
-
Clone this repository:
git clone https://github.com/mongodb-developer/getting-started-deno-mongodb.git cd getting-started-deno-mongodb
-
Create a
.env
file in the root directory with your MongoDB connection string:MONGODB_URI="your_mongodb_connection_string" DB_NAME="todo_db"
Start the server with the following command:
deno -ERNS --env server.ts
You can access the API at http://localhost:3000
.
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.
We welcome contributions to this repository. If you find a bug or have an idea for an improvement, please open an issue or submit a pull request.