Skip to main content

My first ever npm package

So lately I published my first npm package.
It gave me immense joy to share it with you here.

But it's not something I was planning to do. Things happen you know.
Quickly and unexpectedly.

I was working on a MEAN stack project for the last 2-3 months. When working on the backed of stuff, I was going on creating files and doing the same or somewhat same set of codes over and over again.

If it's something related to user, then the file name of the controller is user.controller.js and the service file name is user.service.js. With method, names are getUser, or getUsers, or deleteUser.

And if it's on some other stuff, say a device, most of the logic remains the same, except this time the name of the method and files changes to deleteDevice and device.controller.js etc.

You get the point.

So which means I am wasting a lot of time on somethings that I could automate, time which I could easily focus on optimizing the code and making it bug-free.

So I wanted to have two birds in one shot. And thus born my first npm package and my lazy file structuring habit (although it's quite nice and powerful).

The package can be obtained from, of course, npm.

Here's the link do try it out.

https://www.npmjs.com/package/lnfc

Now I know the name is quite vague. But hold on to me, I am in the process of making it better.

What the package does, once you install it globally is create a file/folder structure within your barebones projects, with only a few keystrokes, so that you can forget about your nitty bitty code and focus only on your code logic.

C'mon ask yourself how many hours do you waste in your life, writing that same set of code structure but only with a name change?


Comments

Popular posts from this blog

AI. Will it replace us or...?

AI!! The buzzword is too hot in the market nowadays. Do you have a technical product or an idea? If it doesn't have AI in it, then chances are it's not going to be sold like hot cakes. That is how things have changed lately. It is no wonder why me and my colleagues at Gelato want to see what AI can do in a niche department like customer support and service. And that is exactly what we did. For a company like Gelato, which is in the market for production-on-demand, there are a lot of customer questions you need to answer. It can be related to products, queries about shipping and pricing, and so on and so forth. Thus, our customer support team is always happy to help with these recurring questions. Let's take one example. A customer asked us, "Do you ship to Norway?" Now that is an easy question to answer if you have the knowledge written somewhere where you could refer to it and say, "Yes! As a matter of fact, we do." Following the same thread, the next q

A smoooooth operation....

 Backward compatibility...   A word that I used to hear when I started my career. You design your APIs with backward compatibility in mind, don't break anything when you are upgrading, think about this, think about that etc. Well, those teachings from my previous mentors didn't go in vain, as I made a fundamental change in how we report problems @  Gelato .    You see recently @  Gelato , the CS (Customer Support) team moved from A ticketing management system to B ticketing management system, which is a monumental task for all the people involved in the CS team. Even though the fundamental concept remains the same the places, the attributes the concepts, and the naming of different attributes all change if you have this transition. And thus it was a big change for the whole company.    After the decision was taken, the first step was to create a well-written transition document, which the good folks at the CS team tackled. Special thanks to  Bartosz ,  Kyle  and  Anastasiia  fo

My experience with the Golden signals

In June 2022, I embarked on a quest for a new job opportunity. Fortunately, this endeavor began just before the global job market experienced a significant downturn. I must admit, I faced my fair share of rejections during this period, but I also had an epiphany. It became evident that there was so much more to learn and understand in the world of technology. Coming from a small service-based company, I had encountered limitations in terms of how much I could learn on the job. However, during interviews and conversations with senior developers, I gained valuable insights into the architectural and technical decisions made by teams in various companies. One such company that left a lasting impression on me was Delivery Hero. Their technical blog posts provided a wealth of information, especially for someone like me, transitioning from a smaller company where projects had minimal daily active users compared to the scale of Delivery Hero. One particular blog post that caught my attention