piral-samples / piral-live-updates

Show how a Piral instance may be live updated.

Home Page:https://docs.piral.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Piral Logo

Show how a Piral instance may be live updated.

⚡ This sample demonstrates using piral-update to swap a pilet at runtime when it changes.

You can visit this demo at live-updates.samples.piral.cloud/.

Getting Started

Install the dependencies:

npm install

If you want to change the values to your auth0 provider then go ahead and modify the values in the src/client.ts module. These values need to come from auth0 as shown in the next section.

Now run:

npm start

The app shell should be up and running.

For the sample the update is just a simple swap of the "mario5" pilet with the "spaceshoot" pilet. We do not use the feed service for this as these would be two different pilets there and no update is actually happening. Instead, we create the response directly, telling the app shell that both pilets are the same, but in different versions.

More Information

You find more information at the the plugin page.

License

Piral and this sample code is released using the MIT license. For more information see the license file.

About

Show how a Piral instance may be live updated.

https://docs.piral.io

License:MIT License


Languages

Language:TypeScript 56.1%Language:SCSS 30.5%Language:JavaScript 8.8%Language:HTML 4.6%