<commit_before>= Edge App

Either start via the command line:

----
$ ./bin/repl
[Edge] Starting development environment, please wait...
[Edge] Starting nREPL server
[Edge] nREPL client can be connected to port 5600
[Rebel readline] Type :repl/help for online help info
[Edge] Loading Clojure code, please wait...
...
Successfully compiled build :main to "target/public/edge.js" in 1.564 seconds.
Figwheel: Starting CSS Watcher for paths  ["target"]
[Edge] Now enter (go) to start the dev system
----

This starts an nrepl-server, the port is 5600.

[TIP]
====
If you are running CIDER 0.17.0 or greater, you can use `cider-jack-in`, but first ensure `cider-clojure-cli-global-options` is set to `"-A:dev:build:dev/cljs"`

Once you see a REPL, enter `(dev)` to switch to the `dev`
namespace. This gives you the chance to fix any compilation errors
without losing the benefit of a REPL session.
====

Start the system with `(go)`:

----
dev=> (go)
19:49:04.734 [main] INFO  edge.web-listener - Started web-server on port 3000
[Edge] Website can be browsed at http://localhost:3000/
[Edge] Now make code changes, then enter (reset) here
:initiated
----

== Reloaded workflow

Now make changes to the source code under `src`. When you're ready to reload these changes into the system, perform a reset:

----
dev=> (reset)
:reloading (...)
19:50:12.160 [main] INFO  edge.web-listener - Started web-server on port 3000
:resumed
dev=>
----

Each time you make a change, re-issue the `(reset)` at the REPL.

== Documentation

Edge documentation is under link:resources/doc[resources/doc] and served by the
application itself. Navigate to link:https://localhost:3000[].

== ClojureScript

Run a ClojureScript REPL with

----
dev=> (cljs-repl)
----

[TIP]
====
If you're using Emacs wth CIDER 0.17.0 and want to develop with a ClojureScript REPL, with figwheel, there is currently some extra Emacs configuration that you'll need to add to your Emacs configuration (i.e. in your `$HOME/.emacs.d/init.el`).

[source,elisp]
----
(add-to-list 'cider-jack-in-nrepl-middlewares "cider.piggieback/wrap-cljs-repl")
(cider-add-to-alist 'cider-jack-in-dependencies "cider/piggieback" "0.3.4")
----

====


== Cursive support

Current versions of Cursive don't support `deps.edn`, but will work with a `pom.xml`.

You can generate the `pom.xml` with the following command:

----
$ clojure -Spom
----<commit_msg>Note on running a sibling ClojureScript REPL<commit_after>= Edge App

Either start via the command line:

----
$ ./bin/repl
[Edge] Starting development environment, please wait...
[Edge] Starting nREPL server
[Edge] nREPL client can be connected to port 5600
[Rebel readline] Type :repl/help for online help info
[Edge] Loading Clojure code, please wait...
...
Successfully compiled build :main to "target/public/edge.js" in 1.564 seconds.
Figwheel: Starting CSS Watcher for paths  ["target"]
[Edge] Now enter (go) to start the dev system
----

This starts an nrepl-server, the port is 5600.

[TIP]
====
If you are running CIDER 0.17.0, you can use `cider-jack-in`, but first ensure `cider-clojure-cli-global-options` is set to `"-A:dev:build:dev/build:dev/cljs"`

Once you see a REPL, enter `(dev)` to switch to the `dev`
namespace. This gives you the chance to fix any compilation errors
without losing the benefit of a REPL session.
====

Start the system with `(go)`:

----
dev=> (go)
19:49:04.734 [main] INFO  edge.web-listener - Started web-server on port 3000
[Edge] Website can be browsed at http://localhost:3000/
[Edge] Now make code changes, then enter (reset) here
:initiated
----

== Reloaded workflow

Now make changes to the source code under `src`. When you're ready to reload these changes into the system, perform a reset:

----
dev=> (reset)
:reloading (...)
19:50:12.160 [main] INFO  edge.web-listener - Started web-server on port 3000
:resumed
dev=>
----

Each time you make a change, re-issue the `(reset)` at the REPL.

== Documentation

Edge documentation is under link:resources/doc[resources/doc] and served by the
application itself. Navigate to link:https://localhost:3000[].

== ClojureScript

Run a ClojureScript REPL with

----
dev=> (cljs-repl)
----

[TIP]
====
If you're using Emacs wth CIDER 0.17.0 and want to develop with a ClojureScript REPL, with figwheel, there is currently some extra Emacs configuration that you'll need to add to your Emacs configuration (i.e. in your `$HOME/.emacs.d/init.el`).

[source,elisp]
----
(add-to-list 'cider-jack-in-nrepl-middlewares "cider.piggieback/wrap-cljs-repl")
(cider-add-to-alist 'cider-jack-in-dependencies "cider/piggieback" "0.3.4")
----

If you want to keep your existing REPL (for resets), and want to create a second REPL for ClojureScript, use `M-x cider-create-sibling-cljs-repl`.

When asked for the REPL, choose `custom`. Then, when asked for the form, type `(dev/cljs-repl)`.
====


== Cursive support

Current versions of Cursive don't support `deps.edn`, but will work with a `pom.xml`.

You can generate the `pom.xml` with the following command:

----
$ clojure -Spom
----
{'fraction_non_alphanumeric': 0.12912794146727308, 'fraction_numerical': 0.02254300968953925, 'mean_word_length': 3.817142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6295894', 'n_tokens_mistral': 1779, 'n_tokens_neox': 1672, 'n_words': 653}