Tuesday, 28 June 2016

Chapter 3: Authentication using node.js(passport.js) and mongoDb


Authentication nodejs mongodb.jpg

As we all know authentication plays an important role in every site. Here In this blog I am explaining how we will authenticate our site in node.js as a backend and mongoDb as a database. To authenticate I am using passport.js which will help to login with facebook,twitter and google etc.
In this article I am explaining local authentication with a mongoDb backend.
Prerequisites:
Install node.js,express.js and mongoDb .For installing them please read my previous blog.
when all installation are completed then we will create a new project using express.
  1. express AuthApp
  2. cd AuthApp
  3. npm install
Next we will install passport module by using below command.
  1. npm install passport

Thursday, 9 June 2016

Using href link values inside your select box


javascript.jpg
In this post, you will learn how to connect select box option with the anchor tag link.
Sometimes you want to change the select box value like an anchor tag with the refresh of page. Lets understand this with an example.
If you have select box in your html code like this:
  1. <select name=“language”>
  2. <option value=“english”>English</option>
  3. <option value=“hindi”>Hindi</option>
  4. <option value=“french”>French</option>
  5. <option value=“german”>German</option>
  6. </select>
Now, you want to refresh the page with the value selected from the select box. you can do the same thing with the anchor tag simply by giving the value to href attribute and it will refresh the page each time you click on anchor tag with the value associated with it…….

Here is not the end…. To read Full Blog About Using href link values inside your select box Click here>>

To read such more Blogs like this Visit our Nerd Digest’s Newest Javascript Development Blog Section at Findnerd.