Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 1.08 KB

README.md

File metadata and controls

25 lines (15 loc) · 1.08 KB

Remote app

Installation

  1. git clone [email protected]:Sampath-vi/remote.git
  2. cd remote; npm install; npm start; - The app should start on port 8081.
  3. Expose this port via ngrok or use the localhost and copy the URL. This URL will be necessary for the host app to acccess these resources.

Directory

  • This app consists of a Counter and Health component which will both be reused in the host app.
  • The Counter component just increments the state locally.
  • The Health component uses mobx store to fetch the config-backend health and display the result.

Webpack

  • The resources are being exposed via webpack in a file called remoteEntry.js. Once the server is up, navigate to http://localhost:8081/remoteEntry.js.
  • Components are being exposed and configured in webpack.config.js - webpack.config.js
  • More on Module Federation - module-federation

Host

Host App