Git Product home page Git Product logo

digitaltwin-pbc's Introduction

How to use

Open the file ./config/settings.json

{
  "name": "dtmModule",
  "template": "./src/index.html",
  "endpoint": "remote.js",
  "devServerPort": 9091,
  "typesOutputDir": "public/types",
  "public": ["..","public"],
  "remotes": [],
  "exposes": {}
}

Change the devServerPort to a free port and the name of the module that will be registered in the registry. Then expose any new components you develop. For example add key-values to the expose object. The key will be used by external services to access the implementation in the value.

    "./pages/Page1": "./src/components/pages/Page1.tsx",
    "./pages/Page2": "./src/components/pages/Page2.tsx"

In variable remotes you can list the projects you want to use in this module by its registry id, e.g. dtmServices, dtmUX. These modules must be registered in the platform registry.

To start developing just type:

  yarn
  yarn start:dev

Remote microfrontend types will be synchronized and immediately available for developers. Remote types will become available from the folder types/{module}.

In your local tests, you need to generate the proper registry. Namely, you must add more entries to modules and generate new root objects like dtmModule with the IDs of new modules. If on the same server, ports must not collide.

digitaltwin-pbc's People

Contributors

simoesb avatar

Watchers

Bruno Simões 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.