Coffee & Code

Lifestyle and coding! Tips, tricks, and random thoughts from a software engineer.


Is web development really that hard?

An interesting idea popped into my head the other day – one that involved creating a website. Now, I didn’t want to use your average website builder, and I really couldn’t, as the application I wanted to build required a server.

But what is a server? It’s basically a computer that acts as a hosting provider for your website or service, delivering it to the millions of users logging in everyday.

Sometimes you need more than one server. Having a single server is fine, for small applications with few users, but when you want to scale, you need to expand your server base, as having just one results in a single point of failure.

Anyway, getting a bit off topic here, but I’d never really dabbled in web dev before and had no idea where to begin. Not only that, I wasn’t the best at HTML and CSS. Granted, they’re pretty easy to learn and use, but I’d only tried them a few times and didn’t have much experience.

StackOverflow is your best friend when it comes to these things, and with a quick search, I was able to deploy a live website using my laptop as a server! It only showed Hello World, but hey, it was a start.

Next order of business was to actually have some content on the site. I wanted to have users upload PDF files, which would then be parsed on the server-side, then sent to an external API. All of this required knowledge that I didn’t have, so I spent the next few hours days figuring out how to make it work.

Eventually I managed to get file uploads working, and I was ecstatic! But then I realized that to update HTML files on the client from the server in real-time, I would need to use a custom viewing engine, called EJS. This meant I had to rewrite much of my code. I began the process of integrating EJS, which, surprisingly didn’t take that long!

It took a while to figure out how to actually save the PDF on the server. I didn’t have a database and didn’t plan on using one so that meant deleting the file as soon as processing was completed. Probably not the most efficient way of going about it, but I didn’t really care.

Once I was finished with all of the server-sided code, I tested out my web app, fixed all the errors, and deployed! From there, it was as simple as raking in the money and enjoying life.

Well, not really. Going from testing to production is actually a lot more complicated. Firstly, we need to optimize our code and make sure it runs smoothly. Testing a lot can help with this. After that, we need to host our app on a live server (we can’t use my laptop anymore). I thought it would be as easy as uploading the app files, but of course, it’s not that simple. After uploading to GitHub (which I had no experience with), adding a bunch of additional files I didn’t know I needed, I found a hosting provider that’s completely free (up to a point). It’s called Render and it’ll do the job quite well. After a bit of fiddling, I managed to get my server up and running.

So, is web development really that hard? Not really. With a bit of basic knowledge, you can go far. Just know that if you have problems, StackOverflow is always there to help.

See you next week! 👋



Leave a comment

About Me

Hey! I’m a software engineer, making cool applications with code. I’m proficient in 7 programming languages and have developed multiple popular applications. I made this blog for those who love code, tech, and life.

Newsletter