Micro Frontends in Ember.js using single-spa
- People
- Planets
- Navbar
yarn start
For example, for starting the people and planets mfes(micro frontends),
people
cd src/people
PORT=4200 ember serve
planets
cd src/planets
PORT=4201 ember serve
const planetsApp = registerApplication(
"planets",
() => {
const appName = "planets";
const appUrl = "http://localhost:4200/planets/assets/planets.js";
const vendorUrl = "http://localhost:4200/planets/assets/vendor.js";
return loadEmberApp(appName, appUrl, vendorUrl);
},
(location) => location.pathname.startsWith("/planets")
);
const peopleApp = registerApplication(
"people",
() => {
const appName = "people";
const appUrl = "http://localhost:4201/people/assets/people.js";
const vendorUrl = "http://localhost:4201/people/assets/vendor.js";
return loadEmberApp(appName, appUrl, vendorUrl);
},
(location) => location.pathname.startsWith("/people")
);