This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap-website".
The branch, master has been updated
via 772da7b2cdcfe95fdc55f9c9016de595643bd43a (commit)
via da72a79d9c6ed732d049787bf2d5b040175353bc (commit)
via 878183778f546b812df36f361f5d6eba3b36f061 (commit)
from 887ac720ace7ff4b408beeea9487c6845afb6296 (commit)
Summary of changes:
templates/docs/tutorials/snap-api-0.4.md | 40 +++++++++++++++++++----------
1 files changed, 26 insertions(+), 14 deletions(-)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 772da7b2cdcfe95fdc55f9c9016de595643bd43a
Author: Mighty Byte <[email protected]>
Date: Sun Feb 6 09:18:39 2011 -0500
Added draft of 0.4 release notes.
diff --git a/templates/docs/tutorials/snap-api-0.4.md
b/templates/docs/tutorials/snap-api-0.4.md
index 2c7a046..b8d9209 100644
--- a/templates/docs/tutorials/snap-api-0.4.md
+++ b/templates/docs/tutorials/snap-api-0.4.md
@@ -53,6 +53,7 @@ $ snap init
We now have a skeleton Snap project with a `.cabal` file and a source
directory. Install and run it:
+
~~~~~~ {.shell}
$ cabal install
$ hello-snap -p 8000
commit da72a79d9c6ed732d049787bf2d5b040175353bc
Merge: 8781837 887ac72
Author: Chris Smith <[email protected]>
Date: Sat Feb 5 14:56:47 2011 -0700
Merge branch 'master' of github.com:snapframework/snap-website
commit 878183778f546b812df36f361f5d6eba3b36f061
Author: Chris Smith <[email protected]>
Date: Sat Feb 5 14:56:34 2011 -0700
Updates to tutorial
diff --git a/templates/docs/tutorials/snap-api-0.4.md
b/templates/docs/tutorials/snap-api-0.4.md
index c7b8c43..2c7a046 100644
--- a/templates/docs/tutorials/snap-api-0.4.md
+++ b/templates/docs/tutorials/snap-api-0.4.md
@@ -21,27 +21,29 @@ four components:
- `heist` is the HTML templating library. You do not need it to use Snap,
but you are certainly welcome to.
- - `snap` is a library which contains some useful routines for building Snap
- sites and a `snap` executable which generates a skeleton project to get you
- started.
-
-To install Snap, simply use `cabal`. It's up to you whether or not you want to
-use the Heist templating library; that said, as of version 0.3 heist is a
-dependency for the snap project starter (although, again, you're not forced to
-use it), and our example below does use it.
+ - `snap` is a library which contains the extension framework for organizing
+ pieces of Snap sites. It also contains a `snap` executable which generates
+ a skeleton project to get you started.
+
+To install Snap, simply use `cabal`.
~~~~~~ {.shell}
$ cabal install snap
~~~~~~
+It's up to you whether or not you want to use the Heist templating library.
+However, heist is a dependency for the snap project starter, and our example
+below does use it.
+
## Hello, Snap!
To generate a skeleton Snap web application, the `snap` package installs an
executable `snap` into `$HOME/.cabal/bin`. We can use that to create our "Hello
Snap" application.
-(If you do not want to use `heist`, you should execute `snap init -b` instead
-of `snap init` for a bare-bones skeleton that does not depend on `heist`.)
+(Normally, snap builds an example using Heist and a custom extension to get
your
+project started. Use `snap init -b` instead of `snap init` for a bare-bones
+skeleton.)
~~~~~~ {.shell}
$ mkdir hello-snap
@@ -50,13 +52,22 @@ $ snap init
~~~~~~
We now have a skeleton Snap project with a `.cabal` file and a source
-directory. Install it, run it, and see what your browser thinks of it.
-
+directory. Install and run it:
~~~~~~ {.shell}
$ cabal install
$ hello-snap -p 8000
+Initializing Heist/Impl... done.
+Initializing Timer/Timer... done.
+Listening on http://0.0.0.0:8000/
+~~~~~~
+
+Then see what your browser thinks of it.
+
+~~~~~~ {.shell}
$ curl 'http://localhost:8000/'; echo
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHT
+<html>
+ <head>
+ <title>Snap web server</title>
...
~~~~~~
@@ -71,8 +82,8 @@ simple demo page we start with.
~~~~~ {.shell}
$ cd src
-$ ls
-Application.hs Main.hs Site.hs
+$ ls
+Site.hs Main.hs Application.hs
~~~~~
`Main.hs` contains the `main` entry point to the application. The default
-----------------------------------------------------------------------
hooks/post-receive
--
snap-website
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap