Back-End nightmare…

Long time no blog post. It’s been awhile. For the past 3-4 months, I’ve been taking The Ultimate Web Developer course by Andre Neagoie. His lectures are on-point and dense, in a good way. I am usually coding with him and would pause in between sessions just to take a good look at code or mull over what I just typed. I have high expectations on this course thus far and so far, so good.

Eventually, I reached a breaking point and a huge obstacle.

Back-end development.

Back-end is a totally different monster. I eventually got to the end of the back-end: database chapter but reached a huge obstacle. Everything was great up until this point. For some odd reason, Postman could not do HTTP requests–however, server was up and running smoothly. Code looked fine. I backtracked a few previous videos to see what I missed. I made sure to catch any internal errors in my server and console.log it in my terminal.

What is going on?

Port is running smoothly. No error in code. Hm. It MUST be an error on MY part. It MUST be the server. But exactly what? I created a database, created a password for authentication, made sure the database is running. However, I was not able to register the user on my app and Postman isn’t able to do HTTP requests…hm. This is my fault.

I went on Zero to Mastery’s discord server to ask for advice. Eventually I learned that pg is running on a different server altogether, with a default port: 5432. THIS I didn’t know! I was never aware of the fact that pg runs on something entirely different. I was negligent of the fact that I had to specify it in my db knex object:

 

aha.png

Literally such a small thing such as specifying port # for something I did not need, threw EVERYTHING off. This shows how much I need to learn about back-end development. A lot.

I had to log this one for the books. I just had to. I’ve been stuck on this for about a week, so much as it was hindering me from my studies. Just being stuck on something for awhile was holding me back. Whew. What an “aha” moment! Kind of. I’m relieved I can continue and press on.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s