Add CGI support

This commit is contained in:
2025-12-05 18:08:09 -06:00
parent 993c5655cc
commit bbf122a7eb
4 changed files with 259 additions and 90 deletions

View File

@@ -291,6 +291,14 @@ namespace Tesses::CrossLang
env->SetVariable("Process",dict);
auto process = env->EnsureDictionary(gc,"New");
process->DeclareFunction(gc, "Process", "Create process",{},New_Process);
process->DeclareFunction(gc, "CGIServer", "Create a CGI Server",{"path"},[](GCList& ls, std::vector<TObject> args)->TObject{
Tesses::Framework::Filesystem::VFSPath path;
if(GetArgumentAsPath(args,0,path))
{
return std::make_shared<Tesses::Framework::Http::CGIServer>(path);
}
return Undefined();
});
gc->BarrierEnd();
}
}