mirror of
https://git.tesses.org/tesses50/crosslang.git
synced 2026-06-01 18:25:32 +00:00
Add CGI support
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user