Created
October 18, 2019 19:34
-
-
Save turbo/8641ea86d62ecdac61e13f23621072c4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(let [app (turbo.web.Application:new [ | |
; No arguments, will work for 'localhost:8888' and 'localhost:8888/' | |
["/$" IndexHandler] | |
; Use the part of the url after /user/ as the first argument to | |
; UserHandler:get | |
["/user/(.*)$" UserHandler] | |
; Find two int's separated by a '/' after /add in the url | |
; and pass them as arguments to AddHandler:get | |
["/add/(%d+)/(%d+)$" AddHandler] | |
])] | |
(app:listen 8888) | |
(: (turbo.ioloop.instance) :start)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment