Working on Node, I picked up some hidden gems which I am sure will help you out in your process of building apps.
The obvious benefit of working with Node:
You get to build a server.
When working with PHP, there is already a server setup somewhere, like Apache. I don’t have to worry about anything, just write a bunch of pages and put that up on the server, and it works.
When working with Node, the first thing you do is to write your own server with Express JS.
const express = require('express')
const app = express()
app.listen(3000, () => console.log('We have a server going') )
I got super frustrated when I had to learn the ropes of building an HTTP server, but after a few weeks, I started to get IT.
You can write and configure your own server. By forcing myself to learn how to build servers, I now have a better understanding of how the internet and servers work.
The next gem is now my favorite part of coding:
The Command-line interface.
In the beginning, it bugged me to use the command line to do set of tasks. But after a while, I got used to it. Soon I realized why I had to do all these actions using the CLI.
npm install express
It turns out, when I have to put that application on the server, in many cases I don’t have any graphical user interface installed. I have to run the node commands from a given command line terminal.
By working with NodeJS, I slowly sharpened my command-line skills. I am no longer afraid of using the CMD or terminal to do a bunch of stuff on my computer.
And finally, the biggest benefit I am witnessing:
NodeJS is helping me become a better programmer.
Working with Node, lets me think about the logic rather than the looks. I can visualize the various moving parts in my mind while I am writing a bunch of modules. It’s letting me think like a computer programmer and become a better and more productive programmer.
I am writing code everyday and learning a lot about databases, models, routers, request-response cycles etc.
Okay, NodeJS may not be the best thing out there, but it’s still the closest thing I found out for what I want to build.
What do you think?
Found this post helpful? Please give it a CLAP!