Add possible route using the appropriate http verb (get,
post, put, delete). Currently only get is implemented.
These methods have two arguments: route
, the
description of the url to match, and the callback
to run when the route is matched.
Route urls have a special syntax. They are basically
paths but with two special keywords: :param
which
matches a single component and *
which will match
anything.
hello.html
matches
hello.html only
packages/:package.html
will match
packages/a.html
, packages:/my-package.html
and so on, and the callback will be called with an
argument named package containing "a" and "my-package"
respectively.
*.html
will match anything
ending in .html
and callback will be called with a
"splat" argument
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.