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
Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ You can configure the project to serve the interface from PROGMEM by uncommentin
98
98
99
99
Be aware that this will consume ~150k of program space which can be especially problematic if you already have a large build artefact or if you have added large javascript dependencies to the interface. The ESP32 binaries are large already, so this will be a problem if you are using one of these devices and require this type of setup.
100
100
101
-
A method for working around this issue can be to reduce the amount of space allocated to SPIFFS by configuring the device to use differnt partitioning. If you don't require SPIFFS other than for storing config one approach might be to configure a minimal SPIFFS partition.
101
+
A method for working around this issue can be to reduce the amount of space allocated to SPIFFS by configuring the device to use different partitioning. If you don't require SPIFFS other than for storing config one approach might be to configure a minimal SPIFFS partition.
102
102
103
103
For a ESP32 (4mb variant) there is a handy "min_spiffs.csv" partition table which can be enabled easily:
104
104
@@ -109,7 +109,7 @@ platform = espressif32
109
109
board = node32s
110
110
```
111
111
112
-
This is left as an exersise for the reader as everyone's requirements will vary.
112
+
This is left as an exercise for the reader as everyone's requirements will vary.
113
113
114
114
### Running the interface locally
115
115
@@ -147,7 +147,7 @@ The `REACT_APP_HTTP_ROOT` and `REACT_APP_WEB_SOCKET_ROOT` properties can be modi
147
147
148
148
You can enable CORS on the back end by uncommenting the -D ENABLE_CORS build flag in ['platformio.ini'](platformio.ini) then re-building and uploading the firmware to the device. The default settings assume you will be accessing the development server on the default port on [http://localhost:3000](http://localhost:3000) this can also be changed if required:
149
149
150
-
```
150
+
```properties
151
151
-D ENABLE_CORS
152
152
-D CORS_ORIGIN=\"http://localhost:3000\"
153
153
```
@@ -330,7 +330,7 @@ void loop() {
330
330
331
331
### Developing with the framework
332
332
333
-
The framework promotes a modular design and exposes features you may re-use to speed up the development of your project. Where possible it is recommended that you use the features the frameworks supplies. These are documented in this section and a comprenensive example is provided by the demo project.
333
+
The framework promotes a modular design and exposes features you may re-use to speed up the development of your project. Where possible it is recommended that you use the features the frameworks supplies. These are documented in this section and a comprehensive example is provided by the demo project.
334
334
335
335
The following diagram visualises how the framework's modular components fit together, each feature is described in detail below.
When transmitting settings over HTTP, WebSockets or MQTT they must to be marshalled into a serialzable form. The framework uses ArduinoJson for serialization and provides the abstract classes [SettingsSerializer.h](lib/framework/SettingsSerializer.h) and [SettingsDeserializer.h](lib/framework/SettingsDeserializer.h) to facilitate the seriliaztion of settings:
394
+
When transmitting settings over HTTP, WebSockets, or MQTT they must to be marshalled into a serializable form. The framework uses ArduinoJson for serialization and provides the abstract classes [SettingsSerializer.h](lib/framework/SettingsSerializer.h) and [SettingsDeserializer.h](lib/framework/SettingsDeserializer.h) to facilitate the serialization of settings:
@@ -411,7 +411,7 @@ class LightSettingsDeserializer : public SettingsDeserializer<LightSettings> {
411
411
};
412
412
```
413
413
414
-
It is recommended you make create singletons for your serialzers and that they are stateless:
414
+
Unless you have more complicated requirements most serializers/deserializers are easiest to implement as stateless singletons:
415
415
416
416
```cpp
417
417
static LightSettingsSerializer SERIALIZER;
@@ -513,7 +513,7 @@ The demo project allows the user to modify the MQTT topics via the UI so they ca
513
513
514
514
The framework has security features to prevent unauthorized use of the device. This is driven by [SecurityManager.h](lib/framework/SecurityManager.h).
515
515
516
-
On successful authentication, the /rest/signIn endpoint issues a JWT which is then sent using Bearer Authentication. The framework come with built-in predicates for verifying a users access privileges. The built in AuthenticationPredicates can be found in [SecurityManager.h](lib/framework/SecurityManager.h) and are as follows:
516
+
On successful authentication, the /rest/signIn endpoint issues a [JSON Web Token (JWT)](https://jwt.io/) which is then sent using Bearer Authentication. The framework come with built-in predicates for verifying a users access privileges. The built in AuthenticationPredicates can be found in [SecurityManager.h](lib/framework/SecurityManager.h) and are as follows:
0 commit comments