Well, why we need to reason for this simple statement and write a 2-page article on this?

It is just simple common sense. Client code (even which we wrote) will be executed on the client machine. we don’t have control over machines and the network.

Even if we make UI checks and hide stuff on UI, anybody else can still make an API call with any value.

Never trust client UI

We must do validations on the server-side at 1st priority and client-side validations at 2nd priority.

How we can fix not version so that developer, CI/CD, production, everybody uses the same node version?

Step 1 — Add nodeVersionLock in package.json

we need to add preinstall and prestart scripts too.

Step 2 — Throw errors when undesired node-version found.

Step 3— AutoUpdate of Dockerfile & GitbHub YML

This step is optional and custom. it depends on your setup.

This is an example of my setup where I am calling the above script using pre-commit hooks.

We Indians are very much frustrated with IRCTC. Here are a few suggestions.

1. Remove AC1 and AC2 compartments

Take a look at Mumbai Rajdhani

AC1 has 22 seats = 22x4730 = 1,04,060

AC2 has 54 seats = 54x2835 =1,53,090

AC3 has 64 seats = 72x2040 =1,46,880

You can clearly see that,

AC3 can pack 3…

I have 2 kinds of git repos.

  1. Work-related code where I use my work email Id while git commits.
  2. Open Source code where I use my personal email id while git commits.

A lot of times, email mismatch happen. there is an easy solution for it.

The root cause of this mismatch is the “global” flag

git config --global user.email "EMAIL ID"

setting up “per repo” or “repo specific” user name and email is the solution.

Or you can directly edit the git config file.

.git/config

It is quite easy to set up a “pre-commit” hook to verify If email is not specified.

Narendra Sisodiya

12+yrs exp. JavaScript Expert. Full Stack Expert. React, Nodejs Mongo AWS, Terraform Pulumi. IITian, Open Source. Currently Software Architect @ Prophecy.io

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store