A RESTful API that uses HTTP requests to create, delete, and read bts meme images from a MongoDB database.
Click here to view the public site.
-
A GET request returns memes from the MongoDB database. Documentation can be viewed here.
-
The public site shows an example of how the memes can be filtered by member and category:
- A POST request creates a new meme to store in MongoDB. In this example, a new meme is created with a form.
- A DELETE request deletes a meme from MongoDB. In this example, a meme is deleted with a button.
Tech used: HTML, CSS, JavaScript, Node.js, Express, MongoDB, Cloudinary, Heroku
- Using MongoDB and Cloudinary: Instead of storing the images in the MongoDB database, I opted to store the image URL instead. When a POST request is made, the image is first uploaded via Cloudinary. The Cloudinary URL is then passed into the MongoDB database, along with any other meme details from the form. When a DELETE request is made, the image is deleted from Cloudinary. The meme information is also deleted from MongoDB.