Skip to content

nonblocking/mashroom-demo-ssr-remote-portal-app

Repository files navigation

Mashroom Demo Server-Side Rendering Remote Portal App

Demo App (SPA) for Mashroom Server that shows a random Chuck Norris joke from http://api.icndb.com. This App comes with its own server and BFF (Backend For Frontend) and can be integrated as a Remote App into Mashroom Portal.

This demo is similar to https://github.com/nonblocking/mashroom-demo-remote-portal-app but additionally shows how server-side rendering can be used in Remote Apps.

It also runs on http://demo-ssr-remote-app.mashroom-server.com if you want to test the Remote App capabilities of Mashroom Portal without installing this first.

Screenshot

Usage

npm install
npm run dev

Open in your browser the test page: http://localhost:6089/

To just get the initial HTML: http://localhost:6089/test_ssr

To test the route Mashroom uses to get the initial HTML: POST a JSON body with an empty portalAppSetup like this:

{
    "portalAppSetup": {
        "appConfig": {}
    }
}

to: http://localhost:6089/api/ssr

Integrate it into the Mashroom Portal

NOTE: Requires Mashroom >=2.0.0

Docker

npm install
npm run build
docker build -t mashroom-demo-ssr-remote-portal-app .
docker run --rm -p 6089:6089 mashroom-demo-ssr-remote-portal-app

About

Mashroom Server Demo Remote App with SSR

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published