I was on an a full-stack engineering position interview this past week, and I came to realize that my backend skills really need some work. I’ve come to accept that Javascript is my lynchpin language, and whatever I can do to double down on that knowledge is going to serve me. I’ve decided to write a simple shopping list in the MERN stack! In this post, I’m going to go over the basics of what a MERN stack entails.

What does that stand for?

  • MongoDB
  • Express
  • React
  • NodeJs

Lets talk about each of those pieces…

  1. MongoDB
  • Welcome to your database! MongoDB will serve as your NoSQL server to house your data. MongoDB has a wide install base and its very easy to use! It being NoSQL, you aren’t bound to a rigid structure when creating schemas, allowing for unique individual fields per item. It handles connecting relationships slightly differently, but many programmers find it easier to use!

2. Express

  • As I mentioned before, I really love Javascript. Fat arrow functions rule my life and I don’t see that changing. It was recommended to me that I check out Express for my backend needs. I was taught on Ruby, which doesn’t follow a ton of convention. Express, however, uses typical Javascript syntax and implementation. If you enjoy Javascript, you should enjoy Express as well! Here’s an example of a POST route.
POST route

3. React

  • How I love you, let me count the ways. If you’ve been living under a rock, React is a front-end framework that offers a tremendous amount of modularization for your code. Instead of shoving everything into an index.HTML file, you can pull out pieces of your app into individual components for display. The opportunity for creating generic and reusable pieces of code is rife!

4. Node

  • The backbone of your application. Node is the bedrock on which Express lies. The reality of the fact is you’ve probably been using Node for a long time, and may have not even realized it. Whenever I run an npm install, I think of you, Node.

Hey, it’s a full stack! There are other 3rd party software options to make your life even easier, including Mongoose and router software. The benefit for my using this is that its Javascript across the board. Recently I was rebuilding an app that included a Ruby backend, and you find you run into a naming issue between snake case and camel case. When you’re dealing solely in Javascript, you’re proverbially, g2g.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store