2017-02-16 04:23:28 +11:00
|
|
|
\ App demo:
|
2017-02-18 14:46:43 +11:00
|
|
|
include ../1991.fs
|
2017-02-16 04:23:28 +11:00
|
|
|
|
2017-02-18 14:46:43 +11:00
|
|
|
sourcedir s" public" s+ set-public-path
|
2017-02-21 09:16:05 +11:00
|
|
|
sourcedir s" views/" s+ set-view-path
|
2017-02-16 04:23:28 +11:00
|
|
|
|
|
|
|
: handle-/ s" fff" ;
|
|
|
|
: handle-hi s" hi!" ;
|
|
|
|
|
2017-02-21 09:16:05 +11:00
|
|
|
\ Basic routing:
|
2017-02-16 04:23:28 +11:00
|
|
|
/1991 / handle-/
|
|
|
|
/1991 /hi handle-hi
|
|
|
|
|
2017-02-21 09:16:05 +11:00
|
|
|
\ Views:
|
|
|
|
: page-title s" hmmmm" ;
|
|
|
|
: handle-/index
|
|
|
|
s" index.html" render-view ;
|
|
|
|
: handle-import
|
|
|
|
s" import-version.html" render-view ;
|
|
|
|
/1991 /index handle-/index
|
|
|
|
/1991 /import handle-import
|
|
|
|
|
2017-02-16 04:23:28 +11:00
|
|
|
8080 1991:
|