Polaris – Simple Microservices using only PowerShell

Click for: original source

Very interesting post from Microsoft Powershell team with minimalistic code example how to run a microservice directly from Powershell. This is an experimental code but shows the power of Microsoft platform.

Polaris is a cross-platform, minimalist web framework for PowerShell Core 6. With 6 lines of code, you have your very own web server running and ready to accept requests – all within PowerShell.

PowerShell is evolving and Microsoft want you to experiment with other use cases for PowerShell. With .NET Standard 2.0 out, authors were able to get their hands on the .NET HttpListener class originally from the .NET Framework. With it comes a solution that works anywhere that PowerShell does.

This can be a way to run your own web servers to allow for a language-agnostic way to run PowerShell scripts thanks to HTTP. Imagine a mobile app triggering remote PowerShell scripts all through HTTP. Or hosting a static site and interacting with an external API all using PowerShell for server code.

Awesome! Follow the link to learn more!

[Read More]

Tags microservices containers