Your ROOT_URL in app.ini is https://source.parasitstudio.de:63000/ but you are visiting https://source.parasitstudio.de/wirtz/esp-link/src/commit/bbdd50f887ef16d247e9a75881720bb19b41fa67/web-server/web-server.c You should set ROOT_URL correctly, otherwise the web may not work correctly.
 
 
 
 
 
 
esp-link/web-server/web-server.c

34 lines
661 B

#include "web-server.h"
#include "espfs.h"
#include "config.h"
void ICACHE_FLASH_ATTR webServerBrowseFiles()
{
EspFsIterator it;
espFsIteratorInit(userPageCtx, &it);
{
while( espFsIteratorNext(&it) )
{
if( strlen(it.name) >= 6 )
{
if( os_strcmp( it.name + strlen(it.name)-5, ".html" ) == 0 )
{
os_printf("%s\n", it.name); // TODO
}
}
}
}
}
void ICACHE_FLASH_ATTR webServerInit()
{
espFsInit(userPageCtx, (void *)getUserPageSectionStart(), ESPFS_FLASH);
if( espFsIsValid( userPageCtx ) ) {
os_printf("Valid user file system found!\n");
webServerBrowseFiles();
}
else
os_printf("No user file system found!\n");
}