reddit clone in mern stack react and nodejs

Thoughts after Building a Reddit Clone in MERN (Node & React)

So last week I put together a reddit like site, a clone of reddit as you can say. This is my first MERN stack application I am putting out to the world. I pretty much did a rush work and cut a lot of corners, just to get it out there and see how it goes. Features A user can get a display name. This time I did not use any user registration mechanism. This also lead to some spam, which I will share in the rest of this post. The user can post something and vote up and down. …

Read More

Finally I got to Build a MERN Stack Application!

For those who don’t know, MERN stands for Mongo database, Express framework, React.js framework and Node.js runtime environment. Together they create a software stack for building custom web application. Now that’s all the technical stuff, let me share what’s exactly I mean by all this.. So I know how to make simple websites with HTML and CSS. But the problem is, those sites are dumb, they don’t do anything. If I wanted to make it more than a website, I needed to make it more dynamic. Like adding option for user registration. Give option to add content, comment on it. …

Read More

Node.js is like My Wife and I am Getting Bored with Her :(

As funny and absurd as it sounds, I think it’s a similar feeling. I chased node, I tried to figure it out. I dreamt of building stuff with node. Eventually I figure it out. I learned how to build stuff with it. Then slowly I got bored with it. Looks like the honeymoon period is over 🙁 This is actually an interesting take on learning code. And this also happened with me when learning other languages! If you read my other stuff, you will know that I went from one language to another to finally settle down with JavaScript. For …

Read More

Thoughts After Building a Twitter Clone in Node.js

Last season I built a twitter clone in Node.js. It’s a social media web application built with Node.js, Express, Mongoose and Passport.js. I deployed the app into a live server in Heroku, making it my first live Node/Express app. I first shared the link onto the Node.js Facebook group for feedback. I also asked people not to attack it. Here’s the app in action: So after launching the site, so many things I realized for the first time. Let me start with the positive first: The Positive The twitter clone app gave me confidence as a newbie web developer. This …

Read More

Why I am not a Fanboy of JavaScript

JavaScript, I like it, I love to build things with it, but I am not a fanboy. JS is the de facto language of the web. The web browsers only understands JavaScript. For this reason, web developers all around the globe has to learn this language. I chose Node.js to build the backend of my web application, just so that I can use a single language to build both the front and the back. I am not a fanboy of this language, and neither should you. In fact you should not be a fanboy of any given language, framework or …

Read More

Deleting an Item From MongoDB Mongoose By User Permission

The first thing you learn when building a web application is CRUD, Create Read, Update and Destroy. I was learning Node.js to build the backend of my application. The first few lessons were about creating data, and then editing it. In MongoDB mongoose, there are some handy commands for creating, editing items. Let’s say I have a blog post which I created. To edit it, I call the .findOneAndUpdate() method for editing the existing collection. I soon figured out there must be a .removeOne() or .deleteOne() method to delete an item from the database collection. I gave that a try. …

Read More