Giter Club home page Giter Club logo

medusa's Introduction

Medusa

The Module Federation dashboard takes visualizes the relationships between applications that expose and consume federatd modules.

What is Medusa??

click here to watch

Installation and startup

Trying it out on the test data

Step 1:

> yarn install --no-lockfile

Step 2:

> cd dashboard-fe
> yarn build && yarn start

Step 3:

> cd dashboard-example
> yarn build && yarn serve

Trying it out on your own code

Globally install and launch the dashboard:

> npm install -g @module-federation/dashboard
> mfdash

The dashboard will be available on http://localhost:3000/.

In your project, first install the dashboard plugin.

> yarn add @module-federation/dashboard-plugin -D

In your webpack.config.js import the dashboard plugin.

const DashboardPlugin = require("@module-federation/dashboard-plugin");

And add the plugin to the plugins array and alter the parameters to suit.

new DashboardPlugin({
  filename: "dashboard.json",
  dashboardURL: "http://localhost:3000/api/update",
  metadata: {
    baseUrl: "http://localhost:3002",
    source: {
      url: "https://github.com/module-federation/federation-dashboard/tree/master/dashboard-example/dsl",
    },
    remote: "http://localhost:3002/remoteEntry.js",
  },
});

Neither filename nor dashboardURL are required. It's up to you how and when to invoke this plugin and how to store that data and send it to the dashboard. The /api/update endpoint just takes a JSON payload 'as-is'. To post the dashboard.json data manually use a curl request like this:

> curl "http://localhost:3000/api/update" -X POST \
  -d @dashboard-example/utils/dist/dashboard.json \
  -H "Content-type: application/json"

Metadata isn't required, but it does make the experience better. For example, the source URL is used to provide clickable file links in some views. And the remote is used when providing information on how to consume the modules provided by

You should be able to see your application listed. You are not required to have all your federated applicatons listed in the dashboard. But if application A depends on application B, and A is in the dashboard, but B is not, then you will not see references to B because the dashboard doesn't have that data. So you should do your best to get all the applications data into the dashboard.

medusa's People

Contributors

karlhorky avatar scriptedalchemy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.