It is very difficult to always manage the same style of code without any tools. Tabs and spaces are always confusing, and quotes and double quotes are also confusing.
Using multiple styles of code in a single project creates confusion among members. That’s true even if it’s a project you’re working on alone.
So I started to use several tools:
Recently, I had to implement image upload to show the profile image. It was very simple I think, but I don’t know if it will be easy in the future. I decided to make it into a tutorial because image upload implementation is frequently required.
In this article, you will learn how to implement images api using Express and Multer. In addition, here we use PostgreSQL to store information about image files.
PostgreSQL or Postgres is a free and open-source RDBMS emphasizing extensibility and SQL compliance(wikipedia). For more information on “PostgreSQL,” see the official documentation. This post focuses on how to use PostgreSQL in Linux.
The following methods are provided on the PostgreSQL Document. If it’s not Debian-based Linux such as Ubuntu, You need to try another way for your OS.
# Create the file repository configuration:
$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'# Import the repository signing key:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -# Update the package lists: