Coast is a full stack web framework written in Clojure for small teams or solo developers. It uses a relational database and renders html on the server without javascript which allows you to ship your web applications faster
(ns my-project
(:require [coast]))
(def routes [[:get "/" :home]])
(defn home [req]
[:h1 "You're coasting on clojure!"])
(def app (coast/app {:routes routes}))
(coast/server app {:port 1337})
- Make sure clojure is installed first
brew install clojure
- Install the coast cli script
curl -o /usr/local/bin/coast https://raw.githubusercontent.com/coast-framework/coast/master/coast && chmod a+x /usr/local/bin/coast
- Create a new coast project
coast new myapp && cd myapp && make server
- Make sure you have bash, curl, rlwrap, and Java installed
curl -O https://download.clojure.org/install/linux-install-1.9.0.391.sh
chmod +x linux-install-1.9.0.391.sh
sudo ./linux-install-1.9.0.391.sh
- Install the coast cli script
sudo curl -o /usr/local/bin/coast https://raw.githubusercontent.com/coast-framework/coast/master/coast && sudo chmod a+x /usr/local/bin/coast
- Create a new coast project
coast new myapp && cd myapp && make server
You should be greeted with the text "You're coasting on clojure!"
when you visit http://localhost:1337
The docs are still under construction, but there should be enough there to get a production-ready website off the ground
Any contribution is welcome! Submit a PR and let's get it merged in!
Coast on Clojure is released under the MIT License.