mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
tutorial: Skylark01
git-svn-id: svn://ultimatepp.org/upp/trunk@5127 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
344e417c7b
commit
0843ecdfd6
3 changed files with 35 additions and 11 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
uses
|
||||
Core;
|
||||
Core,
|
||||
Skylark;
|
||||
|
||||
file
|
||||
Skylark01.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "SSE2";
|
||||
"" = "SSE2 MT";
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue