tutorial: Skylark01

git-svn-id: svn://ultimatepp.org/upp/trunk@5127 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-07-05 18:38:44 +00:00
parent 344e417c7b
commit 0843ecdfd6
3 changed files with 35 additions and 11 deletions

View file

@ -1,8 +1,31 @@
#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
}
#include <Skylark/Skylark.h>
using namespace Upp;
SKYLARK(HomePage, "**")
{
http << "<html><body>Hello world!</body></html>";
}
SKYLARK(Param, "*/param")
{
http << "<html><body>Param entered: " << http[0] << "</html></body>";
}
struct MyApp : SkylarkApp {
MyApp() {
root = "myapp";
prefork = 0;
use_caching = false;
}
};
CONSOLE_APP_MAIN
{
#ifdef DEBUG
StdLogSetup(LOG_FILE|LOG_COUT);
skylark_log = true;
#endif
MyApp().Run();
}

View file

@ -1,9 +1,10 @@
uses
Core;
Core,
Skylark;
file
Skylark01.cpp;
mainconfig
"" = "SSE2";
"" = "SSE2 MT";

View file

@ -1,5 +1,5 @@
#ifndef _Skylark01_icpp_init_stub
#define _Skylark01_icpp_init_stub
#include "Core/init"
#include "plugin/sqlite3/init"
#include "Skylark/init"
#endif