Skip to content

Commit

Permalink
deploy: a6719f6
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Jun 5, 2024
1 parent 71999dc commit 37352f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html><head><meta charset="utf-8" /><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" /><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" /><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/styles/github-gist.min.css" rel="stylesheet" type="text/css" /><title>Cask: a Scala HTTP micro-framework</title><style>@media (min-width: 60em) {.WideStyles-header{
<html><head><meta charset="utf-8" /><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" /><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" /><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/styles/github-gist.min.css" rel="stylesheet" type="text/css" /><title>Cask - a Scala HTTP micro-framework</title><style>@media (min-width: 60em) {.WideStyles-header{
bottom: 0px;
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -114,7 +114,7 @@
.Styles-subtleLink{
text-decoration: none;
}
</style><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/highlight.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/languages/scala.min.js"></script><script>hljs.initHighlightingOnLoad();</script><meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" /></head><body style="margin: 0px; background-color: #f8f8f8;"><div class="WideStyles-header NarrowStyles-header Styles-headerStyle"><div class="NarrowStyles-headerContent"><h1 style="text-align: center; padding: 30px 30px; margin: 0px;"><a style="color: #f8f8f8; font-weight: bold;" href="" class="Styles-subtleLink NarrowStyles-flexFont"> Cask</a></h1><div class="Styles-headerLinkBox"><div class="WideStyles-tableOfContents" style="color: #f8f8f8;"><div style="padding-left: 40px;" class="NarrowStyles-disappear"><b>Pages</b></div><div style="overflow-y: auto; flex-shrink: 1; min-height: 0px;"><ul style="overflow: hidden; text-align: start; margin-top: 10px; white-space: nowrap; text-overflow: ellipsis; margin-right: 10px;"><li class="WideStyles-marginLeftZero NarrowStyles-floatLeft"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="index.html">Cask: a Scala HTTP micro-framework</a></li><li class="WideStyles-marginLeftZero NarrowStyles-floatLeft"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="page/main-customization.html">Main Customization</a></li><li class="WideStyles-marginLeftZero NarrowStyles-floatLeft"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="page/about-cask.html">About Cask</a></li></ul></div></div></div></div><hr class="NarrowStyles-disappear" style="background-color: #f8f8f8; width: 80%;" /><div class="WideStyles-tableOfContents NarrowStyles-disappear" style="color: #f8f8f8;"><div style="padding-left: 40px;" class="NarrowStyles-disappear"><b>Table of Contents</b></div><div style="overflow-y: auto; flex-shrink: 1; min-height: 0px;"><ul style="overflow: hidden; text-align: start; margin-top: 10px; white-space: nowrap; text-overflow: ellipsis; margin-right: 10px;"><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#getting-started">Getting Started</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#minimal-example">Minimal Example</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#variable-routes">Variable Routes</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#query-params">Query Params</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#multi-method-routes">Multi-method Routes</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#receiving-form-encoded-or-json-data">Receiving Form-encoded or JSON data</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#processing-cookies">Processing Cookies</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#serving-static-files">Serving Static Files</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#redirects-or-aborts">Redirects or Aborts</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#html-rendering">HTML Rendering</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#extending-endpoints-with-decorators">Extending Endpoints with Decorators</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#custom-endpoints">Custom Endpoints</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#gzip--deflated-responses">Gzip &amp; Deflated Responses</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#websockets">Websockets</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#todomvc-api-server">TodoMVC Api Server</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#todomvc-database-integration">TodoMVC Database Integration</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#todomvc-full-stack-web">TodoMVC Full Stack Web</a></li></ul></div></div></div><div class="WideStyles-content NarrowStyles-content" style="max-width: 900px;"><h1>Cask: a Scala HTTP micro-framework</h1><div style="margin-bottom: 10px;"><div style="display: flex; flex-direction: row; justify-content: space-between;"><div></div><a href="page/main-customization.html">Main Customization <i class="fa fa-arrow-right" aria-hidden="true"></i></a></div></div><p><a href="https://discord.gg/scala"><div style="text-align: center"><img src="https://img.shields.io/badge/discord-join_chat-61AA8F.svg?logo=discord" alt="Discord Chat" style="max-width: 100%; max-height: 500px" /></div></a> <a href="https://www.patreon.com/lihaoyi"><div style="text-align: center"><img src="https://img.shields.io/badge/patreon-sponsor-ff69b4.svg" alt="Patreon" style="max-width: 100%; max-height: 500px" /></div></a></p>
</style><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/highlight.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/languages/scala.min.js"></script><script>hljs.initHighlightingOnLoad();</script><meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" /></head><body style="margin: 0px; background-color: #f8f8f8;"><div class="WideStyles-header NarrowStyles-header Styles-headerStyle"><div class="NarrowStyles-headerContent"><h1 style="text-align: center; padding: 30px 30px; margin: 0px;"><a style="color: #f8f8f8; font-weight: bold;" href="" class="Styles-subtleLink NarrowStyles-flexFont"> Cask</a></h1><div class="Styles-headerLinkBox"><div class="WideStyles-tableOfContents" style="color: #f8f8f8;"><div style="padding-left: 40px;" class="NarrowStyles-disappear"><b>Pages</b></div><div style="overflow-y: auto; flex-shrink: 1; min-height: 0px;"><ul style="overflow: hidden; text-align: start; margin-top: 10px; white-space: nowrap; text-overflow: ellipsis; margin-right: 10px;"><li class="WideStyles-marginLeftZero NarrowStyles-floatLeft"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="index.html">Cask - a Scala HTTP micro-framework</a></li><li class="WideStyles-marginLeftZero NarrowStyles-floatLeft"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="page/main-customization.html">Main Customization</a></li><li class="WideStyles-marginLeftZero NarrowStyles-floatLeft"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="page/about-cask.html">About Cask</a></li></ul></div></div></div></div><hr class="NarrowStyles-disappear" style="background-color: #f8f8f8; width: 80%;" /><div class="WideStyles-tableOfContents NarrowStyles-disappear" style="color: #f8f8f8;"><div style="padding-left: 40px;" class="NarrowStyles-disappear"><b>Table of Contents</b></div><div style="overflow-y: auto; flex-shrink: 1; min-height: 0px;"><ul style="overflow: hidden; text-align: start; margin-top: 10px; white-space: nowrap; text-overflow: ellipsis; margin-right: 10px;"><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#getting-started">Getting Started</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#minimal-example">Minimal Example</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#variable-routes">Variable Routes</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#query-params">Query Params</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#multi-method-routes">Multi-method Routes</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#receiving-form-encoded-or-json-data">Receiving Form-encoded or JSON data</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#processing-cookies">Processing Cookies</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#serving-static-files">Serving Static Files</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#redirects-or-aborts">Redirects or Aborts</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#html-rendering">HTML Rendering</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#extending-endpoints-with-decorators">Extending Endpoints with Decorators</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#custom-endpoints">Custom Endpoints</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#gzip--deflated-responses">Gzip &amp; Deflated Responses</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#websockets">Websockets</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#todomvc-api-server">TodoMVC Api Server</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#todomvc-database-integration">TodoMVC Database Integration</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#todomvc-full-stack-web">TodoMVC Full Stack Web</a></li></ul></div></div></div><div class="WideStyles-content NarrowStyles-content" style="max-width: 900px;"><h1>Cask - a Scala HTTP micro-framework</h1><div style="margin-bottom: 10px;"><div style="display: flex; flex-direction: row; justify-content: space-between;"><div></div><a href="page/main-customization.html">Main Customization <i class="fa fa-arrow-right" aria-hidden="true"></i></a></div></div><p><a href="https://discord.gg/scala"><div style="text-align: center"><img src="https://img.shields.io/badge/discord-join_chat-61AA8F.svg?logo=discord" alt="Discord Chat" style="max-width: 100%; max-height: 500px" /></div></a> <a href="https://www.patreon.com/lihaoyi"><div style="text-align: center"><img src="https://img.shields.io/badge/patreon-sponsor-ff69b4.svg" alt="Patreon" style="max-width: 100%; max-height: 500px" /></div></a></p>
<pre style="background-color: #f8f8f8"><code style="white-space:pre; background-color: #f8f8f8" class="scala">package app
object MinimalApplication extends cask.MainRoutes{
@cask.get(&quot;/&quot;)
Expand Down
2 changes: 1 addition & 1 deletion page/about-cask.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
.Styles-subtleLink{
text-decoration: none;
}
</style><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/highlight.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/languages/scala.min.js"></script><script>hljs.initHighlightingOnLoad();</script><meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" /></head><body style="margin: 0px; background-color: #f8f8f8;"><div class="WideStyles-header NarrowStyles-header Styles-headerStyle"><div class="NarrowStyles-headerContent"><h1 style="text-align: center; padding: 30px 30px; margin: 0px;"><a style="color: #f8f8f8; font-weight: bold;" href=".." class="Styles-subtleLink NarrowStyles-flexFont"> Cask</a></h1><div class="Styles-headerLinkBox"><div class="WideStyles-tableOfContents" style="color: #f8f8f8;"><div style="padding-left: 40px;" class="NarrowStyles-disappear"><b>Pages</b></div><div style="overflow-y: auto; flex-shrink: 1; min-height: 0px;"><ul style="overflow: hidden; text-align: start; margin-top: 10px; white-space: nowrap; text-overflow: ellipsis; margin-right: 10px;"><li class="WideStyles-marginLeftZero NarrowStyles-floatLeft"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="../index.html">Cask: a Scala HTTP micro-framework</a></li><li class="WideStyles-marginLeftZero NarrowStyles-floatLeft"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="main-customization.html">Main Customization</a></li><li class="WideStyles-marginLeftZero NarrowStyles-floatLeft"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="about-cask.html">About Cask</a></li></ul></div></div></div></div><hr class="NarrowStyles-disappear" style="background-color: #f8f8f8; width: 80%;" /><div class="WideStyles-tableOfContents NarrowStyles-disappear" style="color: #f8f8f8;"><div style="padding-left: 40px;" class="NarrowStyles-disappear"><b>Table of Contents</b></div><div style="overflow-y: auto; flex-shrink: 1; min-height: 0px;"><ul style="overflow: hidden; text-align: start; margin-top: 10px; white-space: nowrap; text-overflow: ellipsis; margin-right: 10px;"><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#functions-first">Functions First</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#extensible-annotations">Extensible Annotations</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#simple-first">Simple First</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#thin-wrapper">Thin Wrapper</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#community-libraries">Community Libraries</a></li></ul></div></div></div><div class="WideStyles-content NarrowStyles-content" style="max-width: 900px;"><h1>About Cask</h1><div style="margin-bottom: 10px;"><div style="display: flex; flex-direction: row; justify-content: space-between;"><a href="main-customization.html"><i class="fa fa-arrow-left" aria-hidden="true"></i> Main Customization</a><div></div></div></div><h2 id="functions-first" class="Styles-hoverBox">Functions First<a href="#functions-first" class="Styles-hoverLink"><i class="fa fa-link" aria-hidden="true"></i></a></h2>
</style><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/highlight.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/languages/scala.min.js"></script><script>hljs.initHighlightingOnLoad();</script><meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" /></head><body style="margin: 0px; background-color: #f8f8f8;"><div class="WideStyles-header NarrowStyles-header Styles-headerStyle"><div class="NarrowStyles-headerContent"><h1 style="text-align: center; padding: 30px 30px; margin: 0px;"><a style="color: #f8f8f8; font-weight: bold;" href=".." class="Styles-subtleLink NarrowStyles-flexFont"> Cask</a></h1><div class="Styles-headerLinkBox"><div class="WideStyles-tableOfContents" style="color: #f8f8f8;"><div style="padding-left: 40px;" class="NarrowStyles-disappear"><b>Pages</b></div><div style="overflow-y: auto; flex-shrink: 1; min-height: 0px;"><ul style="overflow: hidden; text-align: start; margin-top: 10px; white-space: nowrap; text-overflow: ellipsis; margin-right: 10px;"><li class="WideStyles-marginLeftZero NarrowStyles-floatLeft"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="../index.html">Cask - a Scala HTTP micro-framework</a></li><li class="WideStyles-marginLeftZero NarrowStyles-floatLeft"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="main-customization.html">Main Customization</a></li><li class="WideStyles-marginLeftZero NarrowStyles-floatLeft"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="about-cask.html">About Cask</a></li></ul></div></div></div></div><hr class="NarrowStyles-disappear" style="background-color: #f8f8f8; width: 80%;" /><div class="WideStyles-tableOfContents NarrowStyles-disappear" style="color: #f8f8f8;"><div style="padding-left: 40px;" class="NarrowStyles-disappear"><b>Table of Contents</b></div><div style="overflow-y: auto; flex-shrink: 1; min-height: 0px;"><ul style="overflow: hidden; text-align: start; margin-top: 10px; white-space: nowrap; text-overflow: ellipsis; margin-right: 10px;"><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#functions-first">Functions First</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#extensible-annotations">Extensible Annotations</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#simple-first">Simple First</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#thin-wrapper">Thin Wrapper</a></li><li style="margin-left: 0px;"><a style="color: #f8f8f8;" class="WideStyles-tableOfContentsItem" href="#community-libraries">Community Libraries</a></li></ul></div></div></div><div class="WideStyles-content NarrowStyles-content" style="max-width: 900px;"><h1>About Cask</h1><div style="margin-bottom: 10px;"><div style="display: flex; flex-direction: row; justify-content: space-between;"><a href="main-customization.html"><i class="fa fa-arrow-left" aria-hidden="true"></i> Main Customization</a><div></div></div></div><h2 id="functions-first" class="Styles-hoverBox">Functions First<a href="#functions-first" class="Styles-hoverLink"><i class="fa fa-link" aria-hidden="true"></i></a></h2>
<p>Inspired by <a href="http://flask.pocoo.org/">Flask</a>, Cask allows you to define your web applications endpoints using simple function <code>def</code>s that you already know and love, annotated with the minimal additional metadata necessary to work as HTTP endpoints.</p>
<p>It turns out that function <code>def</code>s already provide almost everything you need in a HTTP endpoint:</p>
<ul>
Expand Down
Loading

0 comments on commit 37352f3

Please sign in to comment.