Beginning Backend

Hello all,

So as the title suggests, I’ve just started dabbling in the backend world. Truth be told it’s intimidating, scary doesn’t begin to describe how I’m feeling, also don’t forget that fear mixture as well [sigh]. It brings everything I learned from the frontend and tells me “hey hey remember that structure, yeah forget all about that, these are the new rules”… But with that said, the possibilities are endless once I get familiar with it enough to experiment. Also, the moment I got my first server running felt freaking awesome!  Not to mention the moment I connected to a database and fetched and displayed data was the closest I felt as a wizard.

Now that the intro is out of the way, here’s a small thing I worked on with the backend stack. True it might not be that pretty, but it’s a step towards developing my skills. So you might be asking “Okay okay we get it what have you done just tell us” to you fellow reader I tell you, I’m trying to display cats drawn by ASCII art.

For this project, I’ve used a couple of models Which I will list:

  • EJS [template engine]
  • cat-me [a model that generates the ASCII art cats]

Thinking about this, I thought “simply just generate the cat display it on the screen”. So I did just that and



Yeah… I completely forgot that white spaces are ignored. So I started messing with regular expressions and trying to solve it and well

Why the hell isn’t it rendering the HTML right… it turns out passing the data using express and ejs doesn’t manipulate the element like I want it to when I use the dom. [it goes back to the point where I said it breaks everything I learned before]… I got a bit stuck here but then I decided to do a little cheat and just stick a script tag where I manipulate the dom. and well this is what I got

It sorta worked. not puuurfect but not too shabby as well. There’s no demo for this because it’s just practice.

So I’ll be on hiatus for a while so the project will be on a break for a while till I get back. So till then happy coding 🙂

P.S so after posting this, I got a comment from @lliiuiill who mentioned changing the font will make it work. and it did!



So thank you for your help 🙂

 

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

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