ultimatepp/tutorial/Skylark05/main.cpp
cxl c3a2ab22ab .Skylark tutorial
git-svn-id: svn://ultimatepp.org/upp/trunk@5139 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2012-07-06 14:00:18 +00:00

34 lines
475 B
C++

#include <Skylark/Skylark.h>
using namespace Upp;
SKYLARK(HomePage, "")
{
http.RenderResult("Skylark05/index");
}
SKYLARK(Submit, "submit")
{
http("RESULT", ToUpper((String)http["id"]))
.RenderResult("Skylark05/submit");
}
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();
}