-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
718 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(import (libra libra)) | ||
|
||
(get! "/" | ||
(lambda (p) (default-make-response "GET request"))) | ||
|
||
(post! "/" | ||
(lambda (p) (default-make-response "POST request"))) | ||
|
||
(get! "/blog/:user/:age" | ||
(lambda (p) | ||
(define content (string-append "p是储存所有参数(路由/请求)的关联表; " "User: " (params-ref p "user" "") ",Ages: " (params-ref p "age" ""))) | ||
(default-make-json (cons (cons "content" content) p)))) | ||
|
||
(libra:run 8080) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.