Photo by Austin Chan on Unsplash
To start developing, I need to get my machine ready, so I installed node.js via Homebrew (I'm a macOS user), it is quite easy, and node.js installation comes with npm "npm is a package manager for node.js it is like pypi or pip for Python". I used Visual Studio Code as a text editor. Now I'm ready to go 💪🏻.
What I've learned?
While building the REST APIs, I've learned many things, mainly that I'm experiencing the new development stack. Let's see the parts I've learned.
Express.js is a web framework that uses Node.js; it is a minimalist web framework "micro-framework" that receives requests and replies with responses, micro-framework means it doesn't have ORM, template engine, etc. You can feel it is like Python Flask Framework.
I tried to build my models using sequelize JS as I'm more familiar with PostgreSQL DB engine, but it turns to be so tricky to implement my feature using RDBMS system. I switched ORM to Mongoose JS, and my database engine to MongoDB. I was wrong from the beginning, but after switching to MongoDB, it is much easier to implement the feature, as it is a preferred database engine in Node.js community.
Asynchronous Programming 🤔
Final Thoughts 🧐
I enjoyed using Node.js; the community is excellent, there is nothing you can't find a package for on NPM, it is such an active community, but what I don't like in the community is the quality of tutorials, most of the tutorials targeting starters or naive nodejs developers, yes we need tutorials for starters and naive nodejs developers, but what about the advanced tutorials.
The async programming challenge was an eye-opener for me; I need to dig deep in this way of programming especially in Python. I'm lucky that there is a video course on Talk Python training about asynchronous in Python, and I think I will watch it.