2017-02-15 12:23:28 -05:00
|
|
|
\ App demo:
|
2017-02-17 22:46:43 -05:00
|
|
|
include ../1991.fs
|
2017-02-15 12:23:28 -05:00
|
|
|
|
2017-02-17 22:46:43 -05:00
|
|
|
sourcedir s" public" s+ set-public-path
|
2017-02-20 17:16:05 -05:00
|
|
|
sourcedir s" views/" s+ set-view-path
|
2017-02-15 12:23:28 -05:00
|
|
|
|
|
|
|
: handle-/ s" fff" ;
|
|
|
|
: handle-hi s" hi!" ;
|
|
|
|
|
2017-02-20 17:16:05 -05:00
|
|
|
\ Basic routing:
|
2017-02-15 12:23:28 -05:00
|
|
|
/1991 / handle-/
|
|
|
|
/1991 /hi handle-hi
|
|
|
|
|
2017-02-20 17:16:05 -05: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-24 19:35:28 -05:00
|
|
|
: handle-uid
|
2017-02-24 23:29:09 -05:00
|
|
|
s" uid:" get-query-string s+ ;
|
2017-02-24 19:35:28 -05:00
|
|
|
: handle-uid-new
|
2017-02-24 23:29:09 -05:00
|
|
|
s" uid:new:" get-query-string s+ ;
|
2017-02-24 19:35:28 -05:00
|
|
|
: handle-uid-delete
|
2017-02-24 23:29:09 -05:00
|
|
|
s" uid:delete:" get-query-string s+ ;
|
2017-02-24 19:35:28 -05:00
|
|
|
: handle-pid
|
2017-02-24 23:29:09 -05:00
|
|
|
s" pid:" get-query-string s+ ;
|
2017-02-24 19:35:28 -05:00
|
|
|
: handle-pid-new
|
2017-02-24 23:29:09 -05:00
|
|
|
s" pid:new:" get-query-string s+ ;
|
2017-02-24 19:35:28 -05:00
|
|
|
: handle-pid-delete
|
2017-02-24 23:29:09 -05:00
|
|
|
s" pid:delete:" get-query-string s+ ;
|
2017-02-24 19:35:28 -05:00
|
|
|
/1991 /api/v1/users/<uid> handle-uid
|
|
|
|
/1991 /api/v1/users/<uid>/new handle-uid-new
|
|
|
|
/1991 /api/v1/users/<uid>/delete handle-uid-delete
|
|
|
|
/1991 /api/v1/users/<uid>/post/<pid> handle-pid
|
|
|
|
/1991 /api/v1/users/<uid>/post/<pid>/new handle-pid-new
|
|
|
|
/1991 /api/v1/users/<uid>/post/<pid>/delete handle-pid-delete
|
|
|
|
|
2017-02-15 12:23:28 -05:00
|
|
|
8080 1991:
|