CRUD APP with Nodejs, Cloudinary, PostgreSQL and Heroku
NJOKU SAMSON EBERE
Posted on August 23, 2020
Introduction
Life in web development keep getting better with many beautiful tools available to us. These tools are also free. Allow me to introduce a few to you and teach you how to use them to build a simple application.
Express
Express is a Fast, unopinionated and minimalist web framework for Node.js. It is a highly sort out framework with more than 13 million weekly downloads.
Cloudinary
Cloundinary has been taking the lead in managing images. You can use it to efficiently create, manage, and deliver images, videos and other media, personalized and optimized for every device and channel.
PostgreSQL
PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
Heroku
Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud. In order words, it provides you a place to host your application.
Now you see how powerful these tools are. Perhaps you also see why these tools are so popular in web development. In this article, I will take you from the scratch step by step on how to bring these tools together to create an application.
The end product will be a CRUD (Create, Read, Update, Delete) application which allows you to upload images to cloudinary (Create), retrieve the image (Read), edit the image (Update) and destroy the record (Delete). Let's get started.
Building a CRUD Application
Create a server
This is where nodejs applications begin. This is the initial setup that will be the foundation of every other thing. In the article below, I explained how to build a Simple, Secure and Robust Node JS Server
Introduction to Cloudinary
Here, I show step by step how you can upload images to cloudinary with just nodejs. Read Below:
Upload and Retrieve Images
Now, after uploading our images to cloudinary through nodejs, it is almost useless if we can not retrieve or use them. This is where PostgreSQL comes to play. In the next article, I teach you how to keep the record of each image you upload
Cloudinary and Postgresql - Persisting and Retrieving Images Using Nodejs
Update and Delete Images
Sometimes certain data or information might become useless and so we may need to either update them or delete them totally. In the article that follow, I will guide you on how to update the image you uploaded and/or delete it if you wish. Read below:
Cloudinary and Postgresql - Deleting and Updating Images Using Nodejs
Restructuring Our Code
You must have noticed that our code is becoming very lengthy. Now we will break down the code into smaller modules. This will make it easy to read and maintain. Check out the next article below:
Hosting
Our application is complete. We now want to make it available to as many people as possible who will like to use it. Heroku provides us with the needed tools. I have written in details how you can save your project on github and host it on Heroku. Read below:
Pushing to GitHub and Hosting on Heroku With Postgres for Free
Conclusion
If you are coming from a background where you managed images on your own, then you will have appreciated cloudinary. No doubt, we have learnt a lot and you are armed with enough tools to build real world applications that are robust and scale-able.
All Codes are found here
You can also checkout my series on Authentication With MongoDB, Nodejs, React, Heroku and Netlify.
Thank you for reading.
Posted on August 23, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.