Node JS

PUG Switch Case Statement Demo using Node JS and PowerShell

Posted on

A friend of mine asked a very good question “How can I use switch case statement in PUG using variable from route?” which took an hour time to figure it out! See the documentation for case statement here. I have a route like shown below

As usual we are calling the PS script which […]

Node JS

TIP: Node JS PUG Conditionals

Posted on

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 […]

Node JS

Dynamically populate data for drop down list using PUG in Node JS

Posted on

Let me keep this blog simple and easy. All we need to achieve is to dynamically retrieve items in PUG drop down list. Here is the logic!

So, now let us create a data.json file – In my case it’s like below

For our demo let’s list the Skills in drop down list […]

PowerShell

A Simple Self Request Form using PowerShell and NODE.JS

Posted on

In this blog post I will walk you through the simple steps to create a self request form using PowerShell and NODE.JS. As you guessed, I used the below packages to make my job easy. Express node-powershell pug Our goal is to deliver a form as illustrated below! First Name: Last Name: Email: Department: Copyright […]