Building a web app (Whinst) Part 10: Setting up the database

Building Whinst

User authentication is the first thing I’ve decided to do on the Whinst backend. But to start setting up user authentication I first needed to define and create a user and to define and create a user I needed to first set up the database. In this very short article😅, I’ll tell you about how I went about setting up the Whinst database. Let’s dive in🏄🏾.

How I setup the Whinst database👨🏾‍💻

Whinst uses a PostgreSQL database. Before I could start doing anything I first had to download and install PostgreSQL, fortunately for me I already had it installed from my previous project😄. Because I had it already installed I jumped straight into setting up the database.

I first started by creating a new database server. I then moved on to creating the database itself which I named Whinst😏. I also added a username and password for the database. When the database was complete I created only one table which is the user table because that’s the only table necessary for me to start working on authentication. In the user table, I added the fields ID, first name, last name, email and password. I wanted to keep it simple for now by just adding some basic fields needed for user authentication.

With the database setup and ready I’ve since moved on to adding user authentication, which I’ll write about in my next article. Thanks for reading and see you in the next one🙏.


Leave a Comment

Your email address will not be published. Required fields are marked *