on master help sign in
Update app development instructions in README
commiteed2e8d2c039e27d6eb05a9b2eca6635a77ef797 authorSridhar Ratnakumar <srid@srid.ca> dateTue 22 May 2018, 11:21 (8 years ago) parent4ff357d
1 file changed+11−22
README.md+11−22
README.md+11−22
@@ -42,36 +42,25 @@
4242 After running `ob init` this becomes `nix-shell .obelisk/impl -A shell`
4343 for subsequent shells (since `ob init` overwrites `default.nix`).
4444
45−## Building
46−Build the frontend by running
45+## Developing an Obelisk project
4746
48−```bash
49−nix-build -A ghcjs.frontend --out-link frontend-js
50−```
51−
52−Now you can try running the backend in GHCi by running
47+Obelisk leverages ghcid to provide a live-reloading server that handles both frontend and backend. To run your Obelisk app and monitor the source for changes:
5348
54−```bash
55−ob repl backend
5649```
57−and then typing
58−
59−```bash
60−backend
50+ob run
6151```
6252
63−at the GHCi prompt.
53+Now go to http://localhost:8000 (or the port specified in `config/common/route`) to access your app.
6454
65−Point your web browser at [localhost:8000](localhost:8000) and everything should work.
55+Every time you change the Haskell sources file in frontend, common or backend, `ob run` will automatically recompile the modified files and reload the server. Furthermore, it will display on screen the compilation errors and warnings if any.
6656
67−Feel free to edit the frontend and backend directories as you see fit.
57+You may also run a GHCi repl for your Obelisk app as follows:
58+
59+```
60+ob repl
61+```
6862
69−## Developer Tools
70−To increase developer productivity it is highly recommended to make use of the
71−`ob watch` command. This will open a live repl that
72−will compile and refresh itself showing you the latest possible syntax or type errors
73−as well as any other ghc warnings whenever files within their respective directories
74−are saved and updated.
63+From `ob repl` you can import modules from your frontend, common and backend.
7564
7665## Deploying
7766