You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+13-12Lines changed: 13 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ When developing one of the micro front-end applications you will therefore have
63
63
-`local-ssl-proxy` server
64
64
- the MFE app you're developing
65
65
66
-
Given this complexity, it is recommended that you use a tool like [iTerm2](https://iterm2.com) (on Mac) or an equivalent terminal shell on Windows to make terminal management simpler. iTerm2 allows you to setup a pre-defined window layout of terminal sessions, including the directory in which the session starts. With this setup, along with simple shell scripts in each project that configure and start the environment (#TODO), will allow you to get your development environment up and running quickly and easily.
66
+
Given this complexity, it is recommended that you use a tool like [iTerm2](https://iterm2.com) (on Mac) or an equivalent terminal shell on Windows to make terminal management simpler. iTerm2 allows you to setup a pre-defined window layout of terminal sessions, including the directory in which the session starts. This setup, along with simple shell scripts in each project that configure and start the environment, will allow you to get your development environment up and running quickly and easily.
67
67
68
68
### Linting
69
69
We use linting to enforce standardization. Please make sure all lint rules pass before creating PRs.
@@ -131,27 +131,28 @@ This `mfe-core` app has 2 types of configs:
131
131
| Command | Description |
132
132
| -------------------- | ---------------------- |
133
133
| `npm start` | Run server which serves production ready build from `dist` folder |
134
+
| `npm run start-server` | Run server locally for local development (calls on local-server npm script) |
135
+
| `npm run start-client` | Run client locally for local development (calls on local-client npm script) |
134
136
| `npm run build` | Build app with webpack and puts files to the `dist` folder |
135
137
| `npm run local-server` | Run the server on local machine with nodemon |
136
138
| `npm run local-client` | Run the frontend on local machine with webpack-dev-server |
137
139
| `npm run lint` | Check code for lint errors |
138
140
| `npm run format` | Format code using prettier |
139
141
| `npm run test` | Run unit tests |
140
142
141
-
## Local Deployment from multi web servers (nodemon & webpack-dev-server) for local development
143
+
## Local Deployment from multi web servers (nodemon & webpack-dev-server) for local development - (most common)
142
144
143
-
To deploy `mfe-core` app locally run inside the project root `./mfe-core`:
145
+
To run the `mfe-core` app locally, run the following commands from the project root `./mfe-core`:
144
146
145
-
| Command | Description |
146
-
| -------------------- | ---------------------- |
147
-
| `$ export APPMODE="development"; export APPENV="local-multi"` | to add environment variables for application building on local |
148
-
| `$ nvm use 10.22.1` | configure the required node and npm versions via nvm |
149
-
| `$ npm i` | to install dependencies |
150
-
| `$ npm run local-server` | to start the app on port `3000` |
151
-
| `$ export APPMODE="development"; export APPENV="local-multi"; nvm use 10.22.1; npm i; npm run local-client` | to start the app on port `8080` (`run in another terminal`) |
152
-
| `http://local.topcoder-dev.com:8080/micro-frontends-react-route` | open url in browser to access the micro frame with react micro app and micro navbar app |
147
+
Terminal 1
148
+
```
149
+
$ npm run start-server
150
+
```
153
151
154
-
⚠️ **NOTE** : for running locally, you have to use domain `local.topcoder-dev.com` with port `8080` & `3000`. On your local machine access file `/etc/hosts` add the line `127.0.0.1 local.topcoder-dev.com` and open app by URL http://local.topcoder-dev.com:8080
0 commit comments