PowerShell/Polaris

some nice to have features

mikeTWC1984 opened this issue · 0 comments

Add some default index page

Might be useful for testing (to make sure it's up and running,)

Add a param to make adding pages (get routes) easy

routes are a bit tedious while experimenting

$pages=  @{
 index= "C:\temp\index.html"  # if valid path may just extract content
 proccess = {get-process | select name, id, cpu | convertto-html}
 services = {get-service | convertto-html }

}

# then smth like
$polaris | Add-PolarisPages $pages   #OR  Start-Polaris -port 8888 -pages $pages

Have Start-Polaris to open server with default browser

explorer "http://localhost:port" (Win)
open "http://localhost:port" (Mac)
xgd-open "http://localhost:port" (linux)