Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Rewrite the FAQ on how to run in development #22

Merged
merged 1 commit into from

2 participants

@ocharles

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.


This is actually the only work I planned to do, but the other pull requests I did on the way :)

@ocharles ocharles 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.
89a178a
@mightybyte mightybyte merged commit 3a14b5a into snapframework:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 19, 2012
  1. @ocharles

    Rewrite the FAQ on how to run in development

    ocharles authored
    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.
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 9 deletions.
  1. +17 −9 snaplets/heist/templates/faq.md
View
26 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?
Something went wrong with that request. Please try again.