Friday 19 October 2018

What is NodeJS API wrapper?

What is NodeJS API wrapper?

Question: What is NodeJS API wrapper?
It is RESTful services which is integrated within NodeJS.
With use the these RESTful services, we can integrate third party modules in our nodeJS application.


Question: How can use NodeJS API wrapper in our application?
Just download the source code using npm command and use it.

For Example
npm install --save google



Question: Give Few Examples of NodeJS API wrapper?
Following are few examples which provide API Wrapper to use them:
  1. Braintree provide API so that we can integrate paypment stuff, In NodeJS application.
    https://www.npmjs.com/package/braintree

    Offical Website: https://developers.braintreepayments.com
    API Wrapper Purpose: Integrate braintree in nodeJS application
  2. Ipinfodb provide API so that we can get client detail using Ip Address, In NodeJS applicaton.
    https://www.npmjs.com/package/node-ipinfodb
    Offical Website: http://www.ipinfodb.com/
    API Wrapper Purpose: Get client details like city, state, address, and zip etc using Ip Address.
  3. Google provide API wrapper to get search results from google.com
    https://www.npmjs.com/package/google
    Offical Website: https://gooogle.com
    API Wrapper Purpose: Get search Results from google.com

Question: From where we can find all NodeJS Wrappers?
https://www.npmjs.com/browse/keyword/wrapper




Monday 20 August 2018

How to Setup Password Authentication For AWS ec2 Instances

How to Setup Password Authentication For AWS ec2 Instances

Set the password for root user

  1. Login to SSH using  .pem file
  2. Change user as root user.
    sudo su
  3. Go to ssh config file
    vi /etc/ssh/sshd_config
  4. Change the following var in ssh config
    PasswordAuthentication yes
    PermitRootLogin yes
  5. Change the Root password
    passwd root

    It will prompt the password, you need to provide the password two time.
  6. ReStart the server
    service sshd restart

Now, you can login to EC2 instance with password .

Note: we have set the password for root user not for ec2-user