Permalink
Browse files

Rewrite the FAQ on how to run in development

The old documentation isn't very clear as to which instructions one should
apply, so I've rewritten it to have clear headers for each version of Snap, and
also provided a pointer to how it works for people who write code manually/have
to port old code.
  • Loading branch information...
1 parent b793520 commit 89a178ad29483f390b82d00a39fb1825f16053a4 @ocharles ocharles committed Sep 19, 2012
Showing with 17 additions and 9 deletions.
  1. +17 −9 snaplets/heist/templates/faq.md
@@ -109,24 +109,32 @@ list](http://groups.google.com/group/snap_framework) or contact us on our
### How do I run my app in development mode?
-`cabal clean; cabal install -fdevelopment`
+Running Snap in development depends on which version of Snap you are using:
+
+#### Snap 0.9.1.1 upwards
+
+If you used `snap init` to create your project, you simply need to build your
+project with the `development` flag:
+
+ cabal clean; cabal build -fdevelopment
If you've already built your application without development mode, it's
-important to do a clean first.
+important to run `cabal clean` first, as above.
+
+If you didn't use `snap init` to start your project, or are porting old code,
+the general idea is to build against the `snap-loader-dynamic` library and
+launch your server with the `loadSnapTH` function it provides. For more
+information, we recommend running `snap init` and looking at the generated code.
+
+#### Earlier versions of Snap
-NOTE: As of Snap 0.6, to get development mode you first need to build snap
-with `-fhint`:
+To get development mode you first need to build snap with `-fhint`:
cabal install snap -fhint
and then build your application with `-fdevelopment`. If you
don't do this, you'll get `Could not find module 'Snap.Loader.Devel'`.
-NOTE 2: As of Snap 0.9.1.1 you no longer need to build snap with -fhint to
-enable development mode. You only need to use -fdevelopment when you build
-the project template generated by "snap init". Note that if you have existing
-projects generated with pre-0.9 versions of snap, you will have to port them
-to use the 0.9 development mode code.
### How do I enable SSL?

0 comments on commit 89a178a

Please sign in to comment.