Add sample 'hello world' app and enabled_apps config variable.
This commit is contained in:
parent
2928632eba
commit
322db9393d
3 changed files with 16 additions and 4 deletions
12
apps/hello/app.rc
Executable file
12
apps/hello/app.rc
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
fn hello_test {
|
||||
~ $req_path /hello
|
||||
}
|
||||
|
||||
fn hello_setup {
|
||||
app_body_handler = 'hello_body'
|
||||
pageTitle='Hi title!'
|
||||
}
|
||||
|
||||
fn hello_body {
|
||||
echo 'Hello world!'
|
||||
}
|
||||
|
|
@ -261,12 +261,9 @@ fn gen_blog_post_title {
|
|||
###################################
|
||||
# App framework
|
||||
|
||||
|
||||
app_list=( hello )
|
||||
|
||||
fn select_apps {
|
||||
found=()
|
||||
for(a in $app_list) {
|
||||
for(a in $enabled_apps) {
|
||||
. ./apps/$a/app.rc
|
||||
if($a^'_test') {
|
||||
$a^'_setup'
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ formatter=(fproc_cache.rc markdown.pl)
|
|||
# Enable debugging, to disable set to ()
|
||||
debug=true
|
||||
|
||||
# Globablly enabled apps
|
||||
#enabled_apps=( hello )
|
||||
|
||||
# Default site variables, must be set in initrc.local or _werc/config, only siteTitle is required.
|
||||
#masterSite=cat-v.org # Not required!
|
||||
#siteTitle='cat-v'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue