From 6b7f14c69d08e2cbd689ac5c54458c64c6b0f2a0 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Thu, 26 May 2022 20:25:20 +0100 Subject: [PATCH] docs --- docs/README.md | 3 +- docs/images/packed.svg | 385 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 386 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index 62a87e5f..e97f9ff3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3633,7 +3633,6 @@ This makes it possible to serve files on devices with no filesystem. Even on devices with a filesystem, packing some files like Web UI can be beneficial to be resilient to filesystem errors. -packed filesystem In order to use packed filesystem do the following: @@ -3652,6 +3651,8 @@ $ ./pack index.html style.css > packed_fs.c $ cc mongoose.c app.c packed_fs.c -DMG_ENABLE_PACKED_FS=1 ``` +packed filesystem + 4. In your application code: ```c struct mg_http_serve_opts opts = {}; // Initialise empty options diff --git a/docs/images/packed.svg b/docs/images/packed.svg index 0dbbc19e..2859ed75 100644 --- a/docs/images/packed.svg +++ b/docs/images/packed.svg @@ -1 +1,384 @@ -packed_fs.cPACKBUILDApp.exefilex.ymain.jsstyle.cssindex.htmlpacked_fs.cmg-unpack()mg-unlist() \ No newline at end of file + + + + + + + + + + packed_fs.c + + + + + + + + + + + + + + + + + + + + + + + + filex.y + + + + + + + + + + + + + + + + + + + + + + main.js + + + + + + + + + + + + + + + + + + + + + + + + + + style.css + + + + + + + + + + + + + + + + + + + + + + index.html + + + + + + + + + + + + packed_fs.c + + + + + + + + mg_unpack() + + + mg_unlist() + + + + + + + + + + + + + + + + + + + + + + + mongoose.c + + + + + + + + + + + + + + + + + + + + + app.c + + + + + + + + + + + + + PACK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + APP.EXE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BUILD + + + + + + + + + + + + + + + BUILD + + + +