It is possible.
However, it is not known if there are ready-made implementations. For example, the lwip bundled with pico-sdk includes a web server implementation:
https://github.com/lwip-tcpip/lwip/tree ... /apps/http
However, this is an implementation that does not use the file system and delivers content held in constants. It would be possible to customise it to deliver content held in the file system.
Another issue is the need to ensure a means of placing content in the littlefs. If the total amount of content is around 64 KB, there are implementations that mount a USB-connected Pico RAM disk on a PC with a USB mass storage drive and duplicate the content placed on the RAM disk into the littlefs:
https://github.com/oyama/pico-drive-sync
If the content exceeds 64 KB, a different approach is required.
However, it is not known if there are ready-made implementations. For example, the lwip bundled with pico-sdk includes a web server implementation:
https://github.com/lwip-tcpip/lwip/tree ... /apps/http
However, this is an implementation that does not use the file system and delivers content held in constants. It would be possible to customise it to deliver content held in the file system.
Another issue is the need to ensure a means of placing content in the littlefs. If the total amount of content is around 64 KB, there are implementations that mount a USB-connected Pico RAM disk on a PC with a USB mass storage drive and duplicate the content placed on the RAM disk into the littlefs:
https://github.com/oyama/pico-drive-sync
If the content exceeds 64 KB, a different approach is required.
Statistics: Posted by 0yama — Wed Jul 10, 2024 1:45 am