@nebula.js/cli-serve 3.0.0-rc.1 → 3.0.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -37,6 +37,7 @@ Options:
37
37
  --webIntegrationId [string]
38
38
  --fixturePath Path to a folder that will be used as basis when locating
39
39
  fixtures [string] [default: "test/component"]
40
+ --mfe Serves bundle to use in micro frontend [boolean]
40
41
  -h, --help Show help [boolean]
41
42
  ```
42
43
 
@@ -88,3 +89,49 @@ serve({
88
89
  s.close(); // close the server
89
90
  });
90
91
  ```
92
+
93
+ ### Micro Frontend (MFE) Mode
94
+
95
+ The MFE mode, activated with the `--mfe` option, builds a visualisation which is
96
+ used in a micro frontend environemnt. The visualisation is served at:
97
+
98
+ ```
99
+ https://<host>:<port>/pkg/<module name>
100
+ ```
101
+
102
+ The module name is by default the name in `package.json` but may be overriden using the
103
+ `--type` option.
104
+
105
+ The MFE mode runs in HTTPS which requires certificates to be installed in the
106
+ environment running nebula serve.
107
+
108
+ The regular dev environment in nebula serve is disabled when running in this mode.
109
+
110
+ #### How to install trusted certificates locally
111
+
112
+ There are a few ways to install local trusted certificates on your machine, The important
113
+ end result is that there are two files `~/.certs/cert.pem` (the certificate) and
114
+ `~/.certs/key.pem` (the public key). Read about how certificates work
115
+ [here](http://www.steves-internet-guide.com/ssl-certificates-explained/). If you already
116
+ have a self-signed and trusted certificate in this location, then skip this guide.
117
+
118
+ ##### Easy step-by-step guide to install and generate certificates locally
119
+
120
+ Install mkcert - [documentation](https://github.com/FiloSottile/mkcert)
121
+
122
+ ```sh
123
+ brew install mkcert
124
+ ```
125
+
126
+ Make sure the active directory is user folder and run the following:
127
+
128
+ ```sh
129
+ $ mkdir ~/.certs
130
+
131
+ $ mkcert -install
132
+
133
+ $ mkcert -key-file ~/.certs/key.pem -cert-file ~/.certs/cert.pem localhost 127.0.0.1 ::1
134
+
135
+ ```
136
+
137
+ Verify that two new files have appeared in the certs/ - folder