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

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  ...

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...

The alter egos of firebase

 So I was tinkering around the internet as usual, when I came to know about open source alternatives to some of the common tools that we use day in day out. That's when I came to know about firebase alternatives. A service that I used more often to come with a small POC of anything that I want to try out. A couple of the alternatives were  Appwrite  and  Supabase .   I started with appwrite initially, their self-host policy was really awesome and how easy to set it up and get started.    I created a small application on top of appwrite, that I am currently using for my company internal documentation storage. Since it's on top of docker image and resource-heavy I could not deploy it to my AWS free tier server. So sorry about not showing you guys a demo.   After working on top of it, these are my main findings;   Positive   Easy to use, no doubt on that Pretty straightforward documentation on about implementing the features support for a v...