#include using namespace Upp; SKYLARK(HomePage, "") { http << "Hello world!"; } SKYLARK(Param, "*/param") { http << "Parameter: " << http[0] << ""; } SKYLARK(Params, "params/**") { http << "Parameters: "; for(int i = 0; i < http.GetParamCount(); i++) http << http[i] << " "; http << ""; } SKYLARK(CatchAll, "**") { http.Redirect(HomePage); } SKYLARK(Favicon, "/favicon.ico") { http.ContentType("image/png") << LoadFile(GetDataFile("favicon.png")); } struct MyApp : SkylarkApp { MyApp() { root = "myapp"; #ifdef _DEBUG prefork = 0; use_caching = false; #endif } }; CONSOLE_APP_MAIN { #ifdef _DEBUG StdLogSetup(LOG_FILE|LOG_COUT); Ini::skylark_log = true; #endif MyApp().Run(); }