Skip to content

Commit 0907ca5

Browse files
committed
Update README.md
1 parent 8084a61 commit 0907ca5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Create a new `hello.ps1` with the following content:
1919

2020
```posh
2121
Import-Module pglet
22-
Connect-PgletPage
23-
Invoke-Pglet "add text value='Hello, world!'"
22+
$page = Connect-PgletPage
23+
$page.Add((Text -Value "Hello, world!"))
2424
```
2525

2626
Run `hello.ps1` in your PowerShell session and in a new browser window you'll get:
@@ -34,8 +34,9 @@ Here is a local page served by an instance of Pglet server started in the backgr
3434
Add `-Web` parameter to `Connect-PgletPage` call:
3535

3636
```posh
37-
Connect-PgletPage -Web
38-
Invoke-Pglet "add text value='Hello, world!'"
37+
Import-Module pglet
38+
$page = Connect-PgletPage -Web
39+
$page.Add((Text -Value "Hello, world!"))
3940
```
4041

4142
This time page will be created on [Pglet hosted service](https://pglet.io/docs/pglet-service).

0 commit comments

Comments
 (0)