https://github.com/imrenr/restfulapi-with-node.js-express-mongodb
Note-Taking REST API (Node.js + Express + MongoDB) : This is a simple RESTful API built with Node.js, Express, and MongoDB (Mongoose) that allows users to create, read, update, and delete personal notes. It demonstrates the foundational structure of a backend application including routing, database connectivity, and basic server setup.
https://github.com/imrenr/restfulapi-with-node.js-express-mongodb
dotenv express-js mongodb mongoose node-js nodemon restful-api
Last synced: 9 months ago
JSON representation
Note-Taking REST API (Node.js + Express + MongoDB) : This is a simple RESTful API built with Node.js, Express, and MongoDB (Mongoose) that allows users to create, read, update, and delete personal notes. It demonstrates the foundational structure of a backend application including routing, database connectivity, and basic server setup.
- Host: GitHub
- URL: https://github.com/imrenr/restfulapi-with-node.js-express-mongodb
- Owner: ImrenR
- Created: 2025-04-06T15:35:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-09T19:53:49.000Z (about 1 year ago)
- Last Synced: 2025-06-01T16:17:28.273Z (about 1 year ago)
- Topics: dotenv, express-js, mongodb, mongoose, node-js, nodemon, restful-api
- Language: JavaScript
- Homepage:
- Size: 3.23 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Blog Post API (Node.js + Express + MongoDB)
A minimal RESTful API built with **Node.js**, **Express**, and **MongoDB** to perform basic CRUD operations on blog posts.
---
## Features
- Create a blog post ✅
- Retrieve all posts ✅
- Get a specific post by ID ✅
- Delete a post ✅
- JSON-based API using Express ✅
- MongoDB with Mongoose ✅
---
## Getting Started
### Install dependencies
npm install
### Set up your .env file
DB_CONNECTION=mongodb+srv://yourUser:yourPassword@yourCluster.mongodb.net/yourDB?retryWrites=true&w=majority
PORT=8000
### Run the server
nodemon app.js
### Your server should now be running at:
http://localhost:8000
### API Endpoints
Method Endpoint Description
GET /posts Get all posts
POST /posts Create a new post
GET /posts/:postId Get a post by ID
DELETE /posts/:postid Delete a post by ID
### Built With
Node.js
Express.js
MongoDB
Mongoose