piral-samples / piral-microfrontend-demo

A demo for microfrontend webshop product page using Piral. :rocket:

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Piral Logo

Piral Sample · GitHub License Gitter Chat

piral-microfrontend-demo

⚡ A demo for microfrontend webshop product page using Piral. 🚀

View the demo online!

You can visit this demo at tractor.samples.piral.cloud/.

Prerequisites

For running the code you'll need Node.js with NPM. Nothing else is required.

Editing the code should work with convenience in any IDE capable of dealing with TypeScript. Personally, I've used Visual Studio Code.

Installation

Each subdirectory contains a Node project and thus needs to be set up correctly, e.g., (for the app-shell):

cd app-shell
npm i

Alternatively, use the ./install.sh script:

./install.sh

Running

First, make sure you have access to a pilet feed. In the simplest case clone the sample feed repository and follow the instructions for running.

Start the debug version of the app-shell:

cd app-shell
npm start

You should see an empty page (with a red rectangle).

Now open another shell and publish the pilets:

./publish.sh

The upload assumes that the pilet feed service is running at http://localhost:9000/api/v1/pilet. The used API Key is one of the standard ones. If these assumptions are not correct you'll need to correct the settings.

For simplicity, you can also just use the following command (required: install.sh must have been run):

./run.sh

This will clone, install, build, and run a sample feed service. Additionally, everything else will be build, published, and started.

License

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

About

A demo for microfrontend webshop product page using Piral. :rocket:

https://docs.piral.io

License:MIT License


Languages

Language:TypeScript 60.7%Language:CSS 24.5%Language:JavaScript 6.3%Language:Shell 5.8%Language:HTML 2.8%