Example used and explained during the Enfocus Switch 2021 Spring Scripting training:
What's new in Switch 2021 Spring: scripting in detail
More info on using TypeScript and script folders in the advanced training:
Advanced scripting and best practices with Node.js in Switch
The pitstop-server-cli package allows you to use the PitStop Server CLI in a simple way from your Node.js scripts and apps.