Node JS

TIP: Node JS PUG Conditionals

Recently I was working on a tiny project in which I need to make text field as READONLY when it’s backfilled by query and FREE TEXT if empty. Yes, as you guessed I use PowerShell a lot at my workplace. Having said that, let me show case the demo using PowerShell and Node JS

Scenario

Query Active Directory for a given sAMAccountName. If user has mobile number display on web page in a text box as READ ONLY and if null make it free text!

Solution (Conditional Pug – Logic)

Query AD User

Server JS (Route)

Documentation for Reference!

Leave a Reply

Your email address will not be published. Required fields are marked *