Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akunna1/api-mongodb-node-express-
Creating an API using MongoDB, Express.js, and Node.js to create a social media post with CRUD operations. The post includes a message and an image upload
https://github.com/akunna1/api-mongodb-node-express-
crud-api database express-js mongodb mongoose multer node-js
Last synced: 17 days ago
JSON representation
Creating an API using MongoDB, Express.js, and Node.js to create a social media post with CRUD operations. The post includes a message and an image upload
- Host: GitHub
- URL: https://github.com/akunna1/api-mongodb-node-express-
- Owner: akunna1
- Created: 2024-09-09T15:54:46.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-09T16:03:00.000Z (2 months ago)
- Last Synced: 2024-10-10T14:24:55.028Z (about 1 month ago)
- Topics: crud-api, database, express-js, mongodb, mongoose, multer, node-js
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
- database: social_media_db
- collection: posts- npm init -y
- npm install express mongoose multer body-parser##### MongoDB Schema
- There's no need to create a schema in the MongoDB shell, as the schema is defined using Mongoose in the PostSchema##### Endpoints
- Create Post (with image): POST /posts (Form-data: message, image)
- Get All Posts: GET /posts
- Get Single Post: GET /posts/:id
- Update Post (with new image): PUT /posts/:id (Form-data: message, image)
- Delete Post: DELETE /posts/:id