ref: f9707f3280943a550f8e9686b74866d0e7a6a9d2
parent: db0bd05e17d5617e6d428337c148da10c7aa5621
author: uriel <uriel@engel.se.cat-v.org>
date: Sun Dec 21 04:37:40 EST 2008
Add sample 'hello world' app and enabled_apps config variable.
--- /dev/null
+++ b/apps/hello/app.rc
@@ -1,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!'
+}
--- a/bin/cgilib.rc
+++ b/bin/cgilib.rc
@@ -261,12 +261,9 @@
###################################
# 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'
--- a/etc/initrc
+++ b/etc/initrc
@@ -28,6 +28,9 @@
# 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'