microweb 0.1.3__tar.gz → 0.1.4__tar.gz
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.
- {microweb-0.1.3/microweb.egg-info → microweb-0.1.4}/PKG-INFO +317 -20
- microweb-0.1.4/README.md +676 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb/cli.py +230 -39
- {microweb-0.1.3 → microweb-0.1.4/microweb.egg-info}/PKG-INFO +317 -20
- {microweb-0.1.3 → microweb-0.1.4}/microweb.egg-info/requires.txt +2 -0
- {microweb-0.1.3 → microweb-0.1.4}/setup.py +2 -2
- microweb-0.1.3/README.md +0 -381
- {microweb-0.1.3 → microweb-0.1.4}/LICENSE +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/MANIFEST.in +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb/__init__.py +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb/firmware/ESP32_GENERIC-20250415-v1.25.0.bin +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb/firmware/ESP8266_GENERIC-20250415-v1.25.0.bin +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb/firmware/boot.py +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb/firmware/main.py +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb/microweb.py +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb/uploader.py +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb/wifi.py +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb.egg-info/SOURCES.txt +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb.egg-info/dependency_links.txt +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb.egg-info/entry_points.txt +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/microweb.egg-info/top_level.txt +0 -0
- {microweb-0.1.3 → microweb-0.1.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: microweb
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.4
|
4
4
|
Summary: A web server framework for MicroPython . Easily build and deploy web applications using MicroPython.
|
5
5
|
Home-page: https://github.com/ishanoshada/microweb
|
6
6
|
Author: Ishan Oshada
|
@@ -15,6 +15,8 @@ License-File: LICENSE
|
|
15
15
|
Requires-Dist: pyserial
|
16
16
|
Requires-Dist: esptool
|
17
17
|
Requires-Dist: click
|
18
|
+
Requires-Dist: adafruit-ampy
|
19
|
+
Requires-Dist: mpremote
|
18
20
|
Dynamic: author
|
19
21
|
Dynamic: classifier
|
20
22
|
Dynamic: description
|
@@ -84,6 +86,7 @@ With MicroWeb, you get routing, templates, JSON, static files, and more—making
|
|
84
86
|
- [Features](#features)
|
85
87
|
- [Installation](#installation)
|
86
88
|
- [Usage](#usage)
|
89
|
+
- [Creating an Example Application](#creating-an-example-application)
|
87
90
|
- [Flashing the ESP32](#flashing-the-esp32)
|
88
91
|
- [Running a Custom Application](#running-a-custom-application)
|
89
92
|
- [Example Usage](#example-usage)
|
@@ -93,6 +96,7 @@ With MicroWeb, you get routing, templates, JSON, static files, and more—making
|
|
93
96
|
- [Wi-Fi Configuration](#wi-fi-configuration)
|
94
97
|
- [Accessing the Web Server](#accessing-the-web-server)
|
95
98
|
- [CLI Tool Usage Examples](#cli-tool-usage-examples)
|
99
|
+
- [How to Code with MicroWeb](#how-to-code-with-microweb)
|
96
100
|
- [ Feature Updates ](#feature-updates)
|
97
101
|
- [Project Structure](#project-structure)
|
98
102
|
- [Troubleshooting](#troubleshooting)
|
@@ -137,32 +141,32 @@ pip install .
|
|
137
141
|
|
138
142
|
---
|
139
143
|
|
144
|
+
|
140
145
|
## Usage
|
141
146
|
|
142
|
-
|
147
|
+
### Creating an Example Application
|
148
|
+
Generate a sample MicroWeb application with a basic web server, template, and documentation:
|
143
149
|
|
144
150
|
```bash
|
145
|
-
microweb
|
151
|
+
microweb create --path example_app
|
146
152
|
```
|
147
153
|
|
148
|
-
|
149
|
-
|
150
|
-
* `--erase`
|
151
|
-
Erase the entire flash memory before flashing firmware.
|
152
|
-
|
153
|
-
* `--esp8266`
|
154
|
-
Flash ESP8266 firmware instead of the default ESP32.
|
155
|
-
|
156
|
-
* `--firmware firmware.bin`
|
157
|
-
Use a custom `.bin` firmware file. This overrides the default firmware for ESP32 or ESP8266 ( any ).
|
158
|
-
|
154
|
+
- Creates a directory (default: `example_app`) containing `app.py`, `static/index.html`, and a `README.md` with usage instructions.
|
155
|
+
- Option: `--path <directory>` to specify a custom directory name.
|
159
156
|
|
157
|
+
### Flashing MicroPython and MicroWeb
|
158
|
+
Flash MicroPython firmware and MicroWeb to your device:
|
160
159
|
|
160
|
+
```bash
|
161
|
+
microweb flash --port COM10
|
162
|
+
```
|
161
163
|
|
162
|
-
|
164
|
+
#### Options:
|
165
|
+
- `--erase`: Erase the entire flash memory before flashing firmware.
|
166
|
+
- `--esp8266`: Flash ESP8266 firmware instead of the default ESP32.
|
167
|
+
- `--firmware firmware.bin`: Use a custom `.bin` firmware file, overriding the default firmware for ESP32 or ESP8266.
|
163
168
|
|
164
169
|
### Running a Custom Application
|
165
|
-
|
166
170
|
Upload and run a MicroPython script:
|
167
171
|
|
168
172
|
```bash
|
@@ -173,7 +177,17 @@ microweb run app.py --port COM10
|
|
173
177
|
- Uploads and executes the script.
|
174
178
|
- Checks and uploads only changed files by default.
|
175
179
|
- Prompts to run `microweb flash` if MicroPython is not detected.
|
176
|
-
- After running `app.run()`, the ESP32 will host a Wi-Fi access point (AP) if it cannot connect to a configured network.
|
180
|
+
- After running `app.run()`, the ESP32 will host a Wi-Fi access point (AP) if it cannot connect to a configured network. Connect to this AP and access the web server at `http://192.168.4.1` (typical IP in AP mode).
|
181
|
+
|
182
|
+
### Listing Files on the Device
|
183
|
+
List files on the MicroPython device's filesystem:
|
184
|
+
|
185
|
+
```bash
|
186
|
+
microweb ls --port COM10
|
187
|
+
```
|
188
|
+
|
189
|
+
- Displays all files and their sizes in the device's home directory.
|
190
|
+
- Requires MicroPython to be installed on the device.
|
177
191
|
|
178
192
|
---
|
179
193
|
|
@@ -319,23 +333,26 @@ If no credentials are provided, loads `config.json`. If connection fails, starts
|
|
319
333
|
- Use the control panel to update Wi-Fi, test routes, or submit forms.
|
320
334
|
|
321
335
|
---
|
336
|
+
|
322
337
|
## CLI Tool Usage Examples
|
323
338
|
|
324
339
|
The following table summarizes common `microweb` CLI commands. See also: #changes.
|
325
340
|
|
326
341
|
| Command Example | Description |
|
327
342
|
|----------------------------------------------|-----------------------------------------------------------|
|
328
|
-
| `microweb
|
343
|
+
| `microweb create --path example_app` | Create an example MicroWeb app with `app.py`, `static/index.html`, and `README.md`. |
|
344
|
+
| `microweb examples` | Show example commands for using the MicroWeb CLI. |
|
329
345
|
| `microweb flash --port COM10` | Flash MicroPython firmware and upload MicroWeb files. |
|
330
346
|
| `microweb flash --port COM10 --erase` | Erase ESP32 flash before installing MicroPython. |
|
331
347
|
| `microweb run app.py --port COM10` | Upload and run a custom MicroPython script. |
|
332
348
|
| `microweb run app.py --check-only` | Check static/template dependencies without uploading. |
|
333
349
|
| `microweb run app.py --force` | Force upload all files, even if unchanged. |
|
334
|
-
| `microweb run app.py --add-boot` |
|
335
|
-
| `microweb run app.py --remove-boot` |
|
350
|
+
| `microweb run app.py --add-boot` | Upload a `boot.py` to auto-run your app on boot. |
|
351
|
+
| `microweb run app.py --remove-boot` | Remove `boot.py` from the ESP32. |
|
336
352
|
| `microweb run app.py --static static/` | Specify a custom static files folder. |
|
337
353
|
| `microweb run app.py --no-stop` | Do not reset ESP32 before running the app. |
|
338
354
|
| `microweb run app.py --timeout 600` | Set a custom timeout (in seconds) for app execution. |
|
355
|
+
| `microweb ls --port COM10` | List files and their sizes on the ESP32 filesystem. |
|
339
356
|
| `microweb remove --port COM10` | List files on ESP32 (requires `--remove` to actually delete). |
|
340
357
|
| `microweb remove --port COM10 --remove` | Remove all files in ESP32 home directory. |
|
341
358
|
|
@@ -347,6 +364,284 @@ The following table summarizes common `microweb` CLI commands. See also: #change
|
|
347
364
|
For more details, run `microweb --help`.
|
348
365
|
|
349
366
|
|
367
|
+
|
368
|
+
---
|
369
|
+
|
370
|
+
## How to Code with MicroWeb
|
371
|
+
|
372
|
+
This section guides you through writing MicroWeb applications for MicroPython on ESP32. MicroWeb simplifies web development with features like dynamic routing, template rendering, static file serving, JSON responses, and Wi-Fi configuration. Below, we explain the key components of coding with MicroWeb, with examples to help you get started.
|
373
|
+
|
374
|
+
### **1. Setting Up the MicroWeb Application**
|
375
|
+
To start, import the `MicroWeb` class and initialize the app. You can configure debugging and Wi-Fi settings (access point or station mode) in the constructor.
|
376
|
+
|
377
|
+
```python
|
378
|
+
from microweb import MicroWeb
|
379
|
+
|
380
|
+
# Initialize MicroWeb with debug mode and access point (AP) settings
|
381
|
+
app = MicroWeb(debug=True, ap={'ssid': 'MyESP32', 'password': 'mypassword'})
|
382
|
+
```
|
383
|
+
|
384
|
+
**Explanation**:
|
385
|
+
- `debug=True`: Enables detailed logging for troubleshooting, useful during development.
|
386
|
+
- `ap={'ssid': ..., 'password': ...}`: Configures the ESP32 to create a Wi-Fi access point if it cannot connect to a network. Alternatively, use `internet={'ssid': ..., 'password': ...}` for station mode to connect to an existing Wi-Fi network.
|
387
|
+
- If no Wi-Fi credentials are provided, MicroWeb loads settings from `config.json` or starts a default AP (SSID: `ESP32-MicroWeb`, password: `12345678`).
|
388
|
+
|
389
|
+
### **2. Defining Routes**
|
390
|
+
Routes map URLs to handler functions. Use the `@app.route()` decorator to define endpoints and specify HTTP methods (e.g., GET, POST).
|
391
|
+
|
392
|
+
```python
|
393
|
+
@app.route('/')
|
394
|
+
def home(req):
|
395
|
+
return app.render_template('index.html', message='Welcome to MicroWeb!')
|
396
|
+
```
|
397
|
+
|
398
|
+
**Explanation**:
|
399
|
+
- The `@app.route('/')` decorator maps the root URL (`/`) to the `home` function.
|
400
|
+
- The `req` parameter provides access to request data (e.g., `req.method`, `req.form`, `req.json()`).
|
401
|
+
- `app.render_template` renders an HTML template (`index.html`) with dynamic variables (e.g., `message`).
|
402
|
+
|
403
|
+
For dynamic routing with URL parameters:
|
404
|
+
```python
|
405
|
+
@app.route('/greet/<name>')
|
406
|
+
def greet(req, match):
|
407
|
+
name = match.group(1) if match else 'Anonymous'
|
408
|
+
return {'message': f'Hello, {name}!', 'status': 'success'}
|
409
|
+
```
|
410
|
+
|
411
|
+
**Explanation**:
|
412
|
+
- `/greet/<name>` captures a URL parameter (e.g., `/greet/Alice` sets `name` to `Alice`).
|
413
|
+
- The `match` parameter contains the parsed URL parameters, accessed via `match.group(1)`.
|
414
|
+
|
415
|
+
### **3. Handling HTTP Methods**
|
416
|
+
MicroWeb supports multiple HTTP methods (GET, POST, etc.) for a single route using the `methods` parameter.
|
417
|
+
|
418
|
+
```python
|
419
|
+
@app.route('/api/methods', methods=['GET', 'POST'])
|
420
|
+
def methods(req):
|
421
|
+
if req.method == 'GET':
|
422
|
+
return app.json_response({'method': 'GET', 'message': 'This is a GET request'})
|
423
|
+
elif req.method == 'POST':
|
424
|
+
data = req.json()
|
425
|
+
return app.json_response({'method': 'POST', 'received': data})
|
426
|
+
```
|
427
|
+
|
428
|
+
**Explanation**:
|
429
|
+
- The `methods=['GET', 'POST']` parameter allows the route to handle both GET and POST requests.
|
430
|
+
- `req.method` checks the HTTP method to determine the response.
|
431
|
+
- `req.json()` parses JSON data from the POST request body.
|
432
|
+
- `app.json_response` returns a JSON response with the specified data.
|
433
|
+
|
434
|
+
### **4. Rendering Templates**
|
435
|
+
MicroWeb supports rendering HTML templates with dynamic data, ideal for web interfaces. Templates use a simple syntax (e.g., `{% variable %}`) for dynamic content.
|
436
|
+
|
437
|
+
```python
|
438
|
+
@app.route('/submit', methods=['GET', 'POST'])
|
439
|
+
def submit_form(req):
|
440
|
+
if req.method == 'POST':
|
441
|
+
return app.render_template('result.html', data=str(req.form), method='POST')
|
442
|
+
else:
|
443
|
+
return app.render_template('form.html')
|
444
|
+
```
|
445
|
+
|
446
|
+
**Explanation**:
|
447
|
+
- Templates (e.g., `form.html`, `result.html`) must be in the `static/` directory or a specified folder.
|
448
|
+
- `req.form` accesses form data from POST requests.
|
449
|
+
- `app.render_template` passes variables (e.g., `data`, `method`) to the template for dynamic rendering.
|
450
|
+
|
451
|
+
**Example Template (`static/result.html`)**:
|
452
|
+
```html
|
453
|
+
<!DOCTYPE html>
|
454
|
+
<html>
|
455
|
+
<head>
|
456
|
+
<title>Form Result</title>
|
457
|
+
<link rel="stylesheet" href="/style.css">
|
458
|
+
</head>
|
459
|
+
<body>
|
460
|
+
<p><strong>Method:</strong> {% method %}</p>
|
461
|
+
<p><strong>Data:</strong> {% data %}</p>
|
462
|
+
</body>
|
463
|
+
</html>
|
464
|
+
```
|
465
|
+
|
466
|
+
**Explanation**:
|
467
|
+
- The `{% method %}` and `{% data %}` placeholders are replaced with the `method` and `data` variables passed to `app.render_template`.
|
468
|
+
- The `<link rel="stylesheet" href="/style.css">` tag references a static CSS file, served via `app.add_static('/style.css', 'style.css')`.
|
469
|
+
- Ensure `result.html` and `style.css` are in the `static/` directory and uploaded to the ESP32.
|
470
|
+
|
471
|
+
**Example Form Template (`static/form.html`)**:
|
472
|
+
```html
|
473
|
+
<!DOCTYPE html>
|
474
|
+
<html>
|
475
|
+
<head>
|
476
|
+
<title>Form</title>
|
477
|
+
<link rel="stylesheet" href="/style.css">
|
478
|
+
</head>
|
479
|
+
<body>
|
480
|
+
<form method="POST" action="/submit">
|
481
|
+
<input type="text" name="username" placeholder="Enter your name">
|
482
|
+
<button type="submit">Submit</button>
|
483
|
+
</form>
|
484
|
+
</body>
|
485
|
+
</html>
|
486
|
+
```
|
487
|
+
|
488
|
+
**Explanation**:
|
489
|
+
- The form submits data to `/submit` via POST, which is processed by the `submit_form` route.
|
490
|
+
- The `style.css` file is served as a static file, ensuring consistent styling across templates.
|
491
|
+
|
492
|
+
### **5. Serving Static Files**
|
493
|
+
MicroWeb allows serving static files like CSS, JavaScript, or images to enhance web interfaces.
|
494
|
+
|
495
|
+
```python
|
496
|
+
app.add_static('/style.css', 'style.css')
|
497
|
+
```
|
498
|
+
|
499
|
+
**Explanation**:
|
500
|
+
- `app.add_static` maps a URL path (`/style.css`) to a file in the `static/` directory (`style.css`).
|
501
|
+
- Static files must be uploaded to the ESP32’s filesystem using:
|
502
|
+
```bash
|
503
|
+
microweb run app.py --static static/ --port COM10
|
504
|
+
```
|
505
|
+
- In the `result.html` example, `<link rel="stylesheet" href="/style.css">` loads the CSS file for styling.
|
506
|
+
|
507
|
+
### **6. JSON Responses**
|
508
|
+
MicroWeb simplifies JSON responses for API endpoints.
|
509
|
+
|
510
|
+
```python
|
511
|
+
@app.route('/api/status', methods=['GET'])
|
512
|
+
def status(req):
|
513
|
+
return app.json_response({'status': 'running', 'ip': wifi.get_ip()})
|
514
|
+
```
|
515
|
+
|
516
|
+
**Explanation**:
|
517
|
+
- `app.json_response` formats the dictionary as JSON and sets the `Content-Type` to `application/json`.
|
518
|
+
- The `wifi` module (if available) retrieves the ESP32’s IP address.
|
519
|
+
|
520
|
+
### **7. Custom HTTP Headers**
|
521
|
+
You can set custom headers using the `Response` class.
|
522
|
+
|
523
|
+
```python
|
524
|
+
from microweb import Response
|
525
|
+
|
526
|
+
@app.route('/headers')
|
527
|
+
def headers_example(req):
|
528
|
+
resp = Response('Custom header set!', content_type='text/plain')
|
529
|
+
resp.headers['X-Custom-Header'] = 'Value'
|
530
|
+
return resp
|
531
|
+
```
|
532
|
+
|
533
|
+
**Explanation**:
|
534
|
+
- The `Response` class allows custom content types and headers.
|
535
|
+
- `resp.headers` sets additional HTTP headers for the response.
|
536
|
+
|
537
|
+
### **8. Wi-Fi Integration**
|
538
|
+
MicroWeb handles Wi-Fi configuration, allowing the ESP32 to act as an access point or connect to a network.
|
539
|
+
|
540
|
+
```python
|
541
|
+
import wifi
|
542
|
+
from microweb import MicroWeb
|
543
|
+
|
544
|
+
app = MicroWeb(debug=True, ap={'ssid': 'MyESP32', 'password': 'mypassword'})
|
545
|
+
|
546
|
+
@app.route('/api/status', methods=['GET'])
|
547
|
+
def status(req):
|
548
|
+
return app.json_response({'status': 'running', 'ip': wifi.get_ip()})
|
549
|
+
```
|
550
|
+
|
551
|
+
**Explanation**:
|
552
|
+
- The `wifi` module (part of MicroWeb or MicroPython) provides functions like `wifi.get_ip()` to retrieve the device’s IP address.
|
553
|
+
- If Wi-Fi connection fails, the ESP32 starts an access point with the specified `ssid` and `password`.
|
554
|
+
|
555
|
+
### **9. Running the Application**
|
556
|
+
Start the web server with `app.run()`.
|
557
|
+
|
558
|
+
```python
|
559
|
+
if __name__ == '__main__':
|
560
|
+
app.run()
|
561
|
+
```
|
562
|
+
|
563
|
+
**Explanation**:
|
564
|
+
- `app.run()` starts the MicroWeb server, listening for HTTP requests.
|
565
|
+
- Use the CLI to upload and run the script:
|
566
|
+
```bash
|
567
|
+
microweb run app.py --port COM10
|
568
|
+
```
|
569
|
+
|
570
|
+
### **10. Best Practices**
|
571
|
+
- **Error Handling**: Add try-except blocks for `wifi.get_ip()` or `req.form` to handle network or input errors.
|
572
|
+
```python
|
573
|
+
try:
|
574
|
+
ip = wifi.get_ip()
|
575
|
+
except Exception as e:
|
576
|
+
ip = 'N/A'
|
577
|
+
return app.json_response({'status': 'running', 'ip': ip})
|
578
|
+
```
|
579
|
+
- **File Management**: Ensure templates (`index.html`, `form.html`, `result.html`) and static files (`style.css`) exist in the `static/` directory before running.
|
580
|
+
- **Security**: Avoid hardcoding Wi-Fi credentials; use `config.json` or the web interface for configuration.
|
581
|
+
- **Debugging**: Enable `debug=True` during development to log errors and requests.
|
582
|
+
- **Testing**: Test routes with tools like `curl` or a browser (e.g., `http://192.168.4.1/` in AP mode).
|
583
|
+
|
584
|
+
### **11. Example: Putting It All Together**
|
585
|
+
Below is a complete MicroWeb application combining routes, templates, static files, and JSON responses, including the `result.html` template.
|
586
|
+
|
587
|
+
```python
|
588
|
+
import wifi
|
589
|
+
from microweb import MicroWeb
|
590
|
+
|
591
|
+
app = MicroWeb(debug=True, ap={'ssid': 'MyESP32', 'password': 'mypassword'})
|
592
|
+
|
593
|
+
@app.route('/')
|
594
|
+
def home(req):
|
595
|
+
return app.render_template('index.html', message='Welcome to MicroWeb!')
|
596
|
+
|
597
|
+
@app.route('/api/status', methods=['GET'])
|
598
|
+
def status(req):
|
599
|
+
return app.json_response({'status': 'running', 'ip': wifi.get_ip()})
|
600
|
+
|
601
|
+
@app.route('/api/echo', methods=['POST'])
|
602
|
+
def echo(req):
|
603
|
+
data = req.form
|
604
|
+
return app.json_response({'received': data})
|
605
|
+
|
606
|
+
@app.route('/submit', methods=['GET', 'POST'])
|
607
|
+
def submit_form(req):
|
608
|
+
if req.method == 'POST':
|
609
|
+
return app.render_template('result.html', data=str(req.form), method='POST')
|
610
|
+
else:
|
611
|
+
return app.render_template('form.html')
|
612
|
+
|
613
|
+
app.add_static('/style.css', 'style.css')
|
614
|
+
|
615
|
+
if __name__ == '__main__':
|
616
|
+
app.run()
|
617
|
+
```
|
618
|
+
|
619
|
+
**Explanation**:
|
620
|
+
- Combines template rendering (`/`, `/submit`), JSON responses (`/api/status`, `/api/echo`), and static file serving (`/style.css`).
|
621
|
+
- The `/submit` route uses `result.html` (as shown above) to display form data and the HTTP method.
|
622
|
+
- Upload and run with:
|
623
|
+
```bash
|
624
|
+
microweb run app.py --port COM10 --static static/
|
625
|
+
```
|
626
|
+
- Access at `http://192.168.4.1` (or the ESP32’s IP address).
|
627
|
+
|
628
|
+
### **12. Testing Your Application**
|
629
|
+
- **Browser**: Open `http://<ESP32-IP>/` (e.g., `http://192.168.4.1`) to access the web server.
|
630
|
+
- **curl**:
|
631
|
+
```bash
|
632
|
+
curl http://192.168.4.1/api/status
|
633
|
+
curl -X POST -d 'username=Alice' http://192.168.4.1/api/echo
|
634
|
+
curl -X POST -d 'username=Alice' http://192.168.4.1/submit
|
635
|
+
```
|
636
|
+
- **CLI Logs**: Monitor logs with `debug=True` to debug issues.
|
637
|
+
- **Template Testing**: Submit a form via `http://192.168.4.1/submit` to see the `result.html` output, styled with `style.css`.
|
638
|
+
|
639
|
+
### **13. Next Steps**
|
640
|
+
- Explore the portfolio demo (`tests/portfolio/`) for a full-featured web app example.
|
641
|
+
- Use `microweb create --path my_app` to generate a template project.
|
642
|
+
- Add boot script support with `microweb run app.py --add-boot --port COM10` for auto-running on power-up.
|
643
|
+
- Check the [CLI Tool Usage Examples](#cli-tool-usage-examples) for advanced commands.
|
644
|
+
|
350
645
|
---
|
351
646
|
|
352
647
|
### Feature Updates
|
@@ -388,6 +683,8 @@ microweb/
|
|
388
683
|
```
|
389
684
|
|
390
685
|
|
686
|
+
|
687
|
+
|
391
688
|
---
|
392
689
|
|
393
690
|
## Troubleshooting
|