Teaching Newbies since 2014

  • Home
  • Javascript ❤
    • JavaScript
    • Node.js
  • WebDev Tuts
  • screencasts
  • Resources
  • VR & AR
  • Github
  • Twitter
  • YouTube
  • RSS
  • C++
You are here: Home / Archives for express.js

August 12, 2019 by: Kauress

Conditionally rendering EJS template with res.locals in express.js

This snippet is to conditionally render navbar items based on whether a user is logged in OR not.  So toggle the ‘Login’ button to ‘Logout’ if the user is already logged in and vice versa. I admit it took more time that I had anticipated. Primarily because in the beginning I insisted on using a global variable in express to manage the user’s ‘isAuthenticated’  state

[ Read More ]

July 27, 2019 by: Kauress

Simply Auth now on heroku!

Past week I’ve been fixing issues with the simply auth project now on heroku! https://simplyauth.herokuapp.com/ I will add a rate limiting feature to limit login attempts to 3 and call it a day with this project. Rate limiting helps with brute force attacks so that a request from the same I.P address cannot have an unlimited amount of login attempts. It also makes an ‘app’

[ Read More ]

June 26, 2019 by: Kauress

Plug and Play Authentication for express.js

  What started out as a small module has become a month long project. Some days I sleep well, other days I keep a notebook besides me to jot down ideas. I’ll be putting this project up on Product Hunt and Gumtree as a stand alone module for other  developers to use. Version 1.0 has the following features: User can make an account using their

[ Read More ]

June 17, 2019 by: Kauress

New project: Authentication from scratch

New project in progress… Vanilla JS project with: 3 Login strategies 2 password reset strategies Security precautions

[ Read More ]

April 22, 2019 by: Kauress

Newbie guide: socket.IO

Guide Introduction What happens? Summary Set up the main project directory Install dependencies Directory structure Create a server in index.js Set up index.html Test your server 10.Make your first socket connection Conclusion Resources Note: This guide covers till setting up socket.IO to be used. A chat app using socket.IO will ensue in part 2 Introduction Socket.IO is a JavaScript library which allows real time bidirectional

[ Read More ]

Copyright © 2022 ·Kauress