Categories
How To Javascript Node JS Programming

[How To] Implement Passport.js Authentication with Sails.js

Here we intend to demonstrate the procedure of local authentication i.e. by using a username and password. Step 1: Dependencies passport passport-local bcrypt List these dependencies inside application_directory/package.json  under dependencies. //application_directory/package.json { … “dependencies”: { … “passport”: “~0.1.16”, “passport-local”: “~0.1.6”, “bcrypt”: “~0.7.6” } … } Step 2: Create user model To create user model run […]

Categories
How To Server Administration

[How To] Using NGinx as a Load Balancer

NGinx is an asynchronous event-driven web-server which has become immensely popular in recent years for its performance advantages. NGinx can be used is a reverse proxy to load balance HTTP requests among back-end servers. Here is how this can be achieved on a standard Ubuntu server: Setup —————————— |———-| Back-end Server 1 (BES1) | | […]