Introduction: Kicking Off My Backend Journey


After completing my Frontend Development program with Scrimba last year and building some amazing personal projects, I’m excited to announce that I’m diving into backend development! To further refine my skills, I’ve enrolled in the ALX Frontend Program to continue strengthening my frontend expertise. But now, it’s time to shift gears and start documenting my journey as I venture into the backend world.
Day 1: Getting Familiar with Node.js and package.json
Today marks the beginning of my backend journey, and my first focus was on understanding one of the core components of any Node.js project: the package.json file. This file is crucial for managing a project’s metadata, dependencies, and configurations. It’s like the heart of the Node.js ecosystem!
I started by learning how to generate the package.json file using npm init, which I did in two ways: through a guided setup and with the -y
flag for a quick auto-generation. The package.json file contains several key fields, such as the project’s name, version, and author. I added my name as the author and made sure to follow proper JSON syntax (double quotes and commas).
Enhancing the package.json File
After getting the basics down, I moved on to improving the file by adding several important fields that will make it more complete:
Description: I added a short description to give others an idea of what the project is about.
Keywords: I included relevant keywords (e.g., "freecodecamp") to make the project more discoverable.
License: I specified the MIT license to clarify the permissions for users.
Version: I set the initial version of the project to 1.0.0.
Exploring Dependencies and Semantic Versioning
One of the most crucial sections of the package.json file is the dependencies section. Here, I can list external packages required for my project. I added a dummy package (@freecodecamp/example) to practice managing dependencies.
I also dove into Semantic Versioning (SemVer), learning about how version numbers work and how to manage updates. By using the tilde (~) and caret (^) characters, I can control whether npm installs the latest patch or minor versions of a package.
Removing Unnecessary Dependencies
By the end of the day, I learned how to manage my project’s dependencies more effectively. If I no longer need a package, I can simply remove the corresponding entry from the dependencies section of package.json. This keeps my project clean and helps prevent unnecessary bloat.
Looking Ahead
I’m excited to continue my backend journey and expand my project further tomorrow. This foundational knowledge will surely prove valuable as I dive deeper into working with more complex backend tools and frameworks. Stay tuned for more updates as I continue to document my progress!
Subscribe to my newsletter
Read articles from Engr Ohazulike Stanley directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Engr Ohazulike Stanley
Engr Ohazulike Stanley
Frontend developer. HTML | CSS | JS | React. Frontend developer, with experience developing websites and web applications