on master help sign in
Doc: fix FAQ on `ob run` wrt GHCJS & JSaddle
c918cacSebastien Mondet
FAQ.md+6−5
@@ -74,7 +74,7 @@ project and,
74* or starts the Obelisk server, which serves:
74* or starts the Obelisk server, which serves:
75 * your backend's route handlers,
75 * your backend's route handlers,
76 * the static assets,
76 * the static assets,
77− * the result of compiling & linking your frontend with GHCJS.
77+ * the [JSaddle](https://github.com/ghcjs/jsaddle) frontend code (while opening its websocket).
78
78
79#### Longer version:
79#### Longer version:
80
80
@@ -105,8 +105,8 @@ It is defined in `./obelisk/lib/run/src/Obelisk/Run.hs`:
105 This runs `runSnapWithCommandLineArgs` and
105 This runs `runSnapWithCommandLineArgs` and
106 * passes routes to the backend
106 * passes routes to the backend
107 (result of the `_backend_run` field of the `Backend x y` “user” record)
107 (result of the `_backend_run` field of the `Backend x y` “user” record)
108− * or to `serveDefaultObeliskApp` (`./lib/backend/src/Obelisk/Backend.hs`) to serve
108+ * or to `serveDefaultObeliskApp` (`./lib/backend/src/Obelisk/Backend.hs`) to
109− static assets (incl. the GHCJS output of the frontend).
109+ serve static assets.
110* Starts `runWidget`
110* Starts `runWidget`
111 which itself runs
111 which itself runs
112 [runSettingsSocket](https://hoogle.haskell.org/?hoogle=runSettingsSocket)
112 [runSettingsSocket](https://hoogle.haskell.org/?hoogle=runSettingsSocket)
@@ -115,6 +115,7 @@ It is defined in `./obelisk/lib/run/src/Obelisk/Run.hs`:
115 * creates the HTTP connection manager
115 * creates the HTTP connection manager
116 ( [`newManager`](https://hackage.haskell.org/package/http-client-0.6.3/docs/Network-HTTP-Client.html#v:newManager))
116 ( [`newManager`](https://hackage.haskell.org/package/http-client-0.6.3/docs/Network-HTTP-Client.html#v:newManager))
117 * calls `obeliskApp` which
117 * calls `obeliskApp` which
118− * has a route to serve [`ghcjs/jsaddle`](https://github.com/ghcjs/jsaddle) (GHCJS bindings to JS/Dom),
118+ * has a route to serve the [JSaddle](https://github.com/ghcjs/jsaddle) frontend,
119 * runs the frontend (*on* the server), to produce pre-rendered pages,
119 * runs the frontend (*on* the server), to produce pre-rendered pages,
120+ * starts the JSaddle web-socket,
120− * falls back to proxying the backend (`fallbackProxy`)
121+ * “falls back” to proxying the backend (`fallbackProxy`).