Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 89a178ad29483f390b82d00a39fb1825f16053a4 1 parent b793520
Oliver Charles authored

Showing 1 changed file with 17 additions and 9 deletions. Show diff stats Hide diff stats

  1. 26  snaplets/heist/templates/faq.md
26  snaplets/heist/templates/faq.md
Source Rendered
@@ -109,24 +109,32 @@ list](http://groups.google.com/group/snap_framework) or contact us on our
109 109
 
110 110
 ### How do I run my app in development mode?
111 111
 
112  
-`cabal clean; cabal install -fdevelopment`
  112
+Running Snap in development depends on which version of Snap you are using:
  113
+
  114
+#### Snap 0.9.1.1 upwards
  115
+
  116
+If you used `snap init` to create your project, you simply need to build your
  117
+project with the `development` flag:
  118
+
  119
+    cabal clean; cabal build -fdevelopment
113 120
 
114 121
 If you've already built your application without development mode, it's
115  
-important to do a clean first.
  122
+important to run `cabal clean` first, as above.
  123
+
  124
+If you didn't use `snap init` to start your project, or are porting old code,
  125
+the general idea is to build against the `snap-loader-dynamic` library and
  126
+launch your server with the `loadSnapTH` function it provides. For more
  127
+information, we recommend running `snap init` and looking at the generated code.
  128
+
  129
+#### Earlier versions of Snap
116 130
 
117  
-NOTE: As of Snap 0.6, to get development mode you first need to build snap
118  
-with `-fhint`:
  131
+To get development mode you first need to build snap with `-fhint`:
119 132
 
120 133
     cabal install snap -fhint
121 134
 
122 135
 and then build your application with `-fdevelopment`.  If you
123 136
 don't do this, you'll get `Could not find module 'Snap.Loader.Devel'`.
124 137
 
125  
-NOTE 2: As of Snap 0.9.1.1 you no longer need to build snap with -fhint to
126  
-enable development mode.  You only need to use -fdevelopment when you build
127  
-the project template generated by "snap init".  Note that if you have existing
128  
-projects generated with pre-0.9 versions of snap, you will have to port them
129  
-to use the 0.9 development mode code.
130 138
 
131 139
 ### How do I enable SSL?
132 140
 

0 notes on commit 89a178a

Please sign in to comment.
Something went wrong with that request. Please try again.