fintech micro-front
npm install fintech-mf* hiba@freightos.com
* ReactJS ( FrontEnd Library )
* Redux ( Application State Container )
* NPM ( Package Manager )
----
##### Run under a host app locally #####
* Make sure to use node version 16.14
* Go to the command line/git bash of your workspace and download the repository.
* git clone https://
* Move into the directory and run npm install, then start it by running npm run start
* In the host APP inject the entry file in a header script either on demand(recommended) or statically,
*
* Make sure you have the same version of react, react-dom, react-router-dom and add them in webpack config file under
the shared modules of the module federation plug in.
* Follow the Module federation load component approach to extract the component from the entry file to load it
* check https://webpack.js.org/concepts/module-federation/
* where module = './App' and scope = 'fintechMf'
* pass the proper configs according to the configs table below
* In order for the MF to handle the routes:
* include the main fintech-mf routes in the host app
* navigate to them to render the micro-front(prev step)
* make sure to pass the baseUrl of routes to the MF so that it append them to its routes paths
##### Run under a host app #####
* Go through the same steps of running it locally and skip point 2,3
* Regarding the entry file path
* production path: https://storage.googleapis.com/festatic-production/microfronts/fintech-mf/latest/fintechMfEntry.js
* testing path: https://storage.googleapis.com/festatic/microfronts/fintech-mf/latest/fintechMfEntry.js
----
#### Deployment ####
* Merging to dev pipeline will handle building and uploading the build files to the production cloud storage.
* Merging to master pipeline will handle building and uploading the build files to the test cloud storage.
* Make sure to pass the proper configs and add the new routes from the host app to handle the changes done in the MF.
----
#### Eslint: ####
* Download “ESLint” extension and make sure to enable it.
* You can find all eslint rules configured in ".eslintrc” file.
----