Skip to content

New ESPAsyncWebserver #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log

## 1.8

### 1.8.0

- Using the new and maintained ESPAsyncWebserver available at https://github.com/ESP32Async/ESPAsyncWebServer, that has some deprecations.

## 1.7

### 1.7.1
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ I often make small to medium-sized microcontroller solutions that run on ESP32 o

In order to be able to easily update OTA, it is important - from the users' point of view - that the update file **consists of one file**. I can't use the SPIFFS/LittleFS solution for this. It is necessary that the WebUI files are included inline in the Arduino or PlatformIO c++ code.

This npm package provides a solution for **inserting any JS client application into the ESP web server** (PsychicHttp and also ESPAsyncWebServer available, PsychicHttp is the default). For this, JS, html, css, font, assets, etc. files must be converted to binary byte array. Npm mode is easy to use and easy to **integrate into your CI/CD pipeline**.
This npm package provides a solution for **inserting any JS client application into the ESP web server** (PsychicHttp and also ESPAsyncWebServer (https://github.com/ESP32Async/ESPAsyncWebServer) available, PsychicHttp is the default). For this, JS, html, css, font, assets, etc. files must be converted to binary byte array. Npm mode is easy to use and easy to **integrate into your CI/CD pipeline**.

> Starting with version v1.8.0, use the new and maintained ESPAsyncWebserver available at https://github.com/ESP32Async/ESPAsyncWebServer

> Starting with version v1.7.0, with the cachetime command line option, you can set whether the browser can cache pages

Expand Down Expand Up @@ -154,7 +156,7 @@ void initSvelteStaticFiles(PsychicHttpServer * server) {

### Engines and ESP variants

ESPAsyncWebServer is a popular web server that can be used on **both ESP32 and ESP8266 microcontrollers**. When you want to generate a file for this, use the `-e async` switch.
ESPAsyncWebServer (current location https://github.com/ESP32Async/ESPAsyncWebServer) is a popular web server. When you want to generate a file for this, use the `-e async` switch.

If you **only work on ESP32**, I recommend using PsychicHttpServer, which uses the native mode ESP-IDF web server inside. This way, its operation is significantly faster and more continuous. You can access this mode with the `-e psychic` switch.

Expand Down
18 changes: 9 additions & 9 deletions demo/esp32/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,61 @@ board_build.partitions = min_spiffs.csv
build_flags =
-D ASYNC
-I include/_
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer
lib_deps = https://github.com/ESP32Async/ESPAsyncWebServer

[env:async_E]
build_flags =
-D ASYNC
-I include/e
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer
lib_deps = https://github.com/ESP32Async/ESPAsyncWebServer

[env:async_EC]
build_flags =
-D ASYNC
-I include/ec
-D SVELTEESP32_ENABLE_ETAG
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer
lib_deps = https://github.com/ESP32Async/ESPAsyncWebServer

[env:async_ECG]
build_flags =
-D ASYNC
-I include/ecg
-D SVELTEESP32_ENABLE_ETAG
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer
lib_deps = https://github.com/ESP32Async/ESPAsyncWebServer

[env:async_ECGC]
build_flags =
-D ASYNC
-I include/ecgc
-D SVELTEESP32_ENABLE_ETAG
-D SVELTEESP32_ENABLE_GZIP
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer
lib_deps = https://github.com/ESP32Async/ESPAsyncWebServer

[env:async_EG]
build_flags =
-D ASYNC
-I include/eg
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer
lib_deps = https://github.com/ESP32Async/ESPAsyncWebServer

[env:async_EGC]
build_flags =
-D ASYNC
-I include/egc
-D SVELTEESP32_ENABLE_GZIP
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer
lib_deps = https://github.com/ESP32Async/ESPAsyncWebServer

[env:async_G]
build_flags =
-D ASYNC
-I include/g
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer
lib_deps = https://github.com/ESP32Async/ESPAsyncWebServer

[env:async_GC]
build_flags =
-D ASYNC
-I include/gc
-D SVELTEESP32_ENABLE_GZIP
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer
lib_deps = https://github.com/ESP32Async/ESPAsyncWebServer



Expand Down
1 change: 1 addition & 0 deletions demo/svelte/dist/assets/index-Bccy-7n-.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion demo/svelte/dist/assets/index-DSjEOBdh.js

This file was deleted.

Binary file modified demo/svelte/dist/favicon.png.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion demo/svelte/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>Svelte to ESP32 demo application</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#f3f4f6" />
<script type="module" crossorigin src="./assets/index-DSjEOBdh.js"></script>
<script type="module" crossorigin src="./assets/index-Bccy-7n-.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-CMpKda2x.css">
</head>

Expand Down
3 changes: 1 addition & 2 deletions demo/svelte/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ export default [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'plugin:unicorn/all',
'plugin:tailwindcss/recommended',
'prettier'
),
unicorn.configs.all,
{
plugins: {
'@typescript-eslint': typescriptEslint,
'simple-import-sort': simpleImportSort,
unicorn,
tailwindcss
},

Expand Down
Loading
Loading