diff --git a/tutorial/Skylark01/Skylark01.cpp b/tutorial/Skylark01/Skylark01.cpp index cb95f8c93..e2a384d07 100644 --- a/tutorial/Skylark01/Skylark01.cpp +++ b/tutorial/Skylark01/Skylark01.cpp @@ -1,8 +1,31 @@ -#include - -using namespace Upp; - -CONSOLE_APP_MAIN -{ - -} +#include + +using namespace Upp; + +SKYLARK(HomePage, "**") +{ + http << "Hello world!"; +} + +SKYLARK(Param, "*/param") +{ + http << "Param entered: " << http[0] << ""; +} + +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(); +} diff --git a/tutorial/Skylark01/Skylark01.upp b/tutorial/Skylark01/Skylark01.upp index 8b1617962..0a416264f 100644 --- a/tutorial/Skylark01/Skylark01.upp +++ b/tutorial/Skylark01/Skylark01.upp @@ -1,9 +1,10 @@ uses - Core; + Core, + Skylark; file Skylark01.cpp; mainconfig - "" = "SSE2"; + "" = "SSE2 MT"; diff --git a/tutorial/Skylark01/init b/tutorial/Skylark01/init index c30db6c03..ca84e225f 100644 --- a/tutorial/Skylark01/init +++ b/tutorial/Skylark01/init @@ -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