- :nothing
serve
start web server using given routes
Parameters
serve routes :block
Attributes
port | :integer | use given port |
verbose | print info log | |
chrome | open in Chrome windows as an app |
Returns
Examples
copyserve .port:18966 [ GET "/" [ "This is the homepage" ] GET "/post" $[id][ send.html ~"This is the post with id: |id|" ] POST "/getinfo" $[id][ send.json write.json ø #[ i: id msg: "This is some info" ] ] ] ; run the app and go to localhost:18966 - that was it! ; the app will respond to GET requests to "/" or "/post?id=..." ; and also POST requests to "/getinfo" with an 'id' parameter