DEV Community

Cover image for BangaJS - Nodejs Framework for Bootstraping Your Project
NJOKU SAMSON EBERE
NJOKU SAMSON EBERE

Posted on

BangaJS - Nodejs Framework for Bootstraping Your Project

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:

  1. Setting Up a Simple, Secure and Robust Node JS Server
  2. CRUD APP with Nodejs, Cloudinary, PostgreSQL and Heroku
  3. Docker - An introduction with Nodejs
  4. Full-Stack Authentication and Hosting (Nodejs, Reactjs, Heroku, Netlify)

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.

Agreement

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.

Bàngá

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.

Bàngá Soup

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.

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

Enter fullscreen mode Exit fullscreen mode

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

Enter fullscreen mode Exit fullscreen mode

Now you should have a folder named my_new_project with files and folders arranged like in the image below:

Folder Structure

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.

How Awesome!!!
Dancing

Start The server

Navigate into the project folder like so:


cd my_new_project

Enter fullscreen mode Exit fullscreen mode

You can choose to run the server in either development or production environment

  • For development:

npm run dev

Enter fullscreen mode Exit fullscreen mode
  • For Production

npm start

Enter fullscreen mode Exit fullscreen mode

Install Dependencies

If you will like to install the already existing dependencies, then run the following code


npm i

Enter fullscreen mode Exit fullscreen mode

Check Documentation

You can also access the documentation via the terminal with the following code:


banga docs

Enter fullscreen mode Exit fullscreen mode

Congratulations!!!
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)

Collapse
 
therealokoro profile image
Okoro Redemption

Osheyyyy 😁. Banga soup 🍲.

Beautiful tool 💪

Collapse
 
ebereplenty profile image
NJOKU SAMSON EBERE

Lol… Naija to the world 😎