Finished WWWGen

This commit is contained in:
Mike Nolan 2024-09-23 22:43:47 -05:00
parent 2a225cccef
commit b242920d19
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,4 @@
#if !defined(DISABLE_TWS)
#include "tesseswebserver.hpp" #include "tesseswebserver.hpp"
#if defined(GEKKO) #if defined(GEKKO)
#include <stdio.h> #include <stdio.h>
@ -100,3 +101,4 @@ int main(int argc,char** argv)
HttpServerListener::FreeServer(); HttpServerListener::FreeServer();
return 0; return 0;
} }
#endif

View File

@ -378,7 +378,7 @@ int main(int argc,char** argv)
std::vector<Resource> resources; std::vector<Resource> resources;
get_files(resources, indexes, enableListing,source,"/"); get_files(resources, indexes, enableListing,source,"/");
std::string cls = "#pragma once\n/* Generated via wwwgen */\n#include <string>\n#include <vector>\n#include <initializer_list>\n#include <filesystem>\n#include <tesseswebserver.hpp>\nclass " + name + "Resource {public: std::vector<uint8_t> data; std::string mime; std::string path; bool isScript; " + name + "Resource(std::string path, std::string mime,bool isScript, std::initializer_list<uint8_t> data) {this->path = path; this->mime = mime; this->isScript=isScript; this->data = data;} };\nclass " + name + " : public Tesses::WebServer::IServer {\n"; std::string cls = "#pragma once\n/* Generated via wwwgen */\n#include <string>\n#include <vector>\n#include <initializer_list>\n#include <filesystem>\n#include \"tesseswebserver.hpp\"\nclass " + name + "Resource {public: std::vector<uint8_t> data; std::string mime; std::string path; bool isScript; " + name + "Resource(std::string path, std::string mime,bool isScript, std::initializer_list<uint8_t> data) {this->path = path; this->mime = mime; this->isScript=isScript; this->data = data;} };\nclass " + name + " : public Tesses::WebServer::IServer {\n";
if(enableScripts) if(enableScripts)
{ {