- Create your repository on github
create-micro-react-app my-app -am
cd my-app/packages/webapp
npm run build
microfrontend-marketplace publish
cd ../microfrontend
npm run build
microfrontend-marketplace publish
- Login using github
- Repositories -> Search for your repo -> Import -> packageName = webapp -> Import Button
- Import New Microfrontend -> Search your repo again -> Import -> packageName = microfrontend -> Import Button
- New deploy -> Choose versions -> deploy -> Go to
https://<YOUR_USERNAME>.github.io/<YOUR_REPO_NAME>/
-
Manage application and microfrontends deploy with github integration
- A simple application would cost nothing thanks for github free public repositories and gh-pages
-
Create multiple versions of your application in one single site
- Rollout your changes progressively using multiple applications at once
-
All of this using
create-micro-react-app
andmicro-react
- Easy to use and maintain
yarn add @cmra/node-app @cmra/webapp
const NodeApp = require('@cmra/server');
const Webapp = require('@cmra/webapp');
const configJson = require('./config.json');
/*
{
"firebase": {
...config from firebase console...
},
"firebaseAdmin": {
...config from google cloud api console...
},
"database": {
"host": "...",
"port": "...",
"username": "...",
"password": "...",
"database": "..."
},
"baseUrl": "http://localhost:8080/"
}
*/
if (!configJson) throw new Error('No config.json found');
const run = async () => {
const destFolder = await Webapp.build({
env: {
FIREBASE_CONFIG_JSON: JSON.stringify(configJson.firebase),
BASE_URL: configJson.baseUrl,
},
});
NodeApp.withDatabase(configJson.database)
.withFirebaseConfig(configJson.firebaseAdmin)
.withStaticFiles(destFolder)
.run(8080);
};
run();