Define schema, apply plugin and more in Mongoose.

I’ve been learning Mongoose and would like to share few notes. Let’s say we have Invoice schema like below defined in mongoose. To this schema I would like to add a new property / key / field that will define the status of the invoice, and this new property takes predefined values, like, an enum.Continue reading “Define schema, apply plugin and more in Mongoose.”

Install npm packages on Elastic Beanstalk aws service instance globally.

First off I am going to assume three things… You know how to create an Elastic Beanstalk aws service instance with Node.js as the platform. You know how to create a key file (.pem) on aws console. You know how to login (ssh) to the instance using the key file. Now the question, why wouldContinue reading “Install npm packages on Elastic Beanstalk aws service instance globally.”

Fix for ‘Host key verification failed’ error.

When we login to a host using ssh we might come across the error ‘Host key verification failed’. If you see additional message saying the ‘host key for XX.XX.XX has changed’ then the fix i am giving will work for you. You see this error because the key of the host system is basically changedContinue reading “Fix for ‘Host key verification failed’ error.”