https://github.com/thecodeholic/deno-mongodb-rest-api
REST API with Deno and oak reading and writing data from MongoDB
https://github.com/thecodeholic/deno-mongodb-rest-api
deno denoapi denoland denomongo denomongogb mongodb oak restapi
Last synced: 6 months ago
JSON representation
REST API with Deno and oak reading and writing data from MongoDB
- Host: GitHub
- URL: https://github.com/thecodeholic/deno-mongodb-rest-api
- Owner: thecodeholic
- Created: 2020-05-25T04:36:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-26T04:19:03.000Z (over 5 years ago)
- Last Synced: 2025-03-21T22:41:30.350Z (7 months ago)
- Topics: deno, denoapi, denoland, denomongo, denomongogb, mongodb, oak, restapi
- Language: TypeScript
- Homepage: https://youtu.be/TMPBEkfIPWk
- Size: 3.91 KB
- Stars: 27
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deno MongoDB REST API
## Installation
1. Clone the repository
2. open `mongodb.ts` file and change `const MONGO_URL = 'mongodb://localhost:27017'` to connect to your mongodb database
3. Start the server by running `deno run --allow-net --allow-write --allow-read --allow-plugin --unstable server.ts`## Usage
You can access the following endpoints on [http://localhost:8000](http://localhost:8000)| METHOD | URL | Description |
|--------|------------|--------------------|
| GET | /notes | Return all notes |
| GET | /notes/:id | Return single note |
| POST | /notes | Create a note |
| PUT | /notes/:id | Update note |
| DELETE | /notes/:id | Delete note |