Introduction
Nodejs is now one of the most popular tool for backend purpose. This is so especially because of how easy it is to understand the language. It is built on JavaScript.
However, it doesn't have so much frameworks out there that gives you all the basics (boring) stuff off the box. Basics includes things like setting up server, folder structure, authentication, mailers and so on.
Just incase you are new to Nodejs, I have a few courses you might want to checkout:
These basics can be so tiring and consumes a lot of time. Where is the fun in doing same thing over and over again? I don't see any. I am sure you will agree with me.
This is why I want to introduce a framework that I came across - Bàngájs
What is Bàngá?
This is the name for Palm nut in the South South part of Nigeria. The Eastern part of Nigeria calls it Akwu.
A lot can be produced from it. However, Bàngá soup or Ofe Akwu is what came to my mind when I first stumbled on this framework because of how tasty the soup is and how well-garnished it is. Please treat yourself to it and you will not regret it.
Well, we are not talking about that literal soup today. We are talking of a well-garnished framework that gives you all the boring basics out of the box. With this, you can now focus on solving real world problems and minimize project setup time to a minimal degree. All you need is a line of code to create your whole project.
Now let me show you how easy it is to setup Bàngájs in your machine and create a project. Just follow my lead.
Prepare your computer for Bàngájs
This step is important because it makes banga
command available in your computer terminal. Run the following code in your terminal:
npm install bangajs -g
Create a project
Now that we have bangajs
installed globally, we are unstopppable. You can do anything you wish. We want to create a new project with the name: my_new_project
.
Run the following code in your terminal:
banga new my_new_project
Now you should have a folder named my_new_project
with files and folders arranged like in the image below:
Notice that it has all the folders (and even more) that you will normally need when setting up a nodejs project. Along with all necessary files. You can easily locate the controllers, views, models, database managers, env and so on. Imagine how much time and resources you have been able to save with that one line of Bàngá installation.
Start The server
Navigate into the project folder like so:
cd my_new_project
You can choose to run the server in either development or production environment
- For development:
npm run dev
- For Production
npm start
Install Dependencies
If you will like to install the already existing dependencies, then run the following code
npm i
Check Documentation
You can also access the documentation via the terminal with the following code:
banga docs
Congratulations!!!
You can now build scalable applications in shorter period of time with even better output.
Conclusion
Bàngájs is a blessing to the Nodejs community. We have seen why that is true as we pointed out in the introduction. We have also seen a little Nigerian detail of Bàngá. Finally, we saw how to setup and create a project with just one line of code each.
Bàngájs has so much you can learn and use. We just made an introduction to it. So I encourage you to checkout the well detailed documentation here.
Top comments (2)
Osheyyyy 😁. Banga soup 🍲.
Beautiful tool 💪
Lol… Naija to the world 😎