Installing Coast is a simple process and will only take a few minutes.
The only dependencies of the framework are java and clojure.
Ensure your versions of those tools match the following criteria:
TIP: You can use tools like jabba to help manage multiple versions of java at the same time.
Coast CLI is a command line tool to help you install Coast.
Install it globally via curl like so:
curl -o /usr/local/bin/coast https://raw.githubusercontent.com/coast-framework/coast/master/coast && chmod a+x /usr/local/bin/coast
Make sure to add the /usr/local/bin directory to your $PATH.
Once installed, you can use the coast new command to create new Coast apps.
For example, to create a new application called zero, type the following into your terminal:
coast new zero
Once the installation process has completed, you can cd into your new application directory and run the following command to start the server:
make server
This command starts the server on the :port defined inside the env.edn file: http://localhost:1337
Or you can run (server/-main) from your REPL. The REPL server can be started from the terminal with:
make repl
Then connect to the editor from your REPL with one of these handy guides:
After the editor is connected to the running REPL server, note this code at the bottom of the server.clj file:
(comment
(-main))
Move your text editor's cursor over any of the letters in -main and press the keyboard shortcut for "sending the text under the cursor" to the REPL server. The http server will start and you can navigate to http://localhost:1337
Can you improve this documentation? These fine people already did:
Sean Walker & JohnEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |