Skip to content

A demo for microfrontend webshop product page using Piral. 🚀

License

Notifications You must be signed in to change notification settings

piral-samples/piral-microfrontend-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Piral Logo

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.