The Coast directory structure may feel overwhelming at first glance since there are a handful of pre-configured directories.
Eventually, you'll understand what is there because of clojure, java or coast itself, but in the mean time it's a decent way to structure web apps with tools.deps
A standard Coast installation looks something like so:
.
├── Makefile
├── README.md
├── bin
│ └── repl.clj
├── db
│ └── migrations/
│ └── associations.clj
├── db.edn
├── deps.edn
├── env.edn
├── resources
│ ├── assets.edn
│ └── public
│ ├── css
│ │ └── app.css
│ └── js
│ └── app.js
├── src
│ ├── components.clj
│ ├── home.clj
│ ├── routes.clj
│ └── server.clj
└── test
└── server_test.clj
The bin
directory is the home of the nREPL server.
The db
directory is used to store all database related files.
The resources
directory is used to serve static assets over HTTP.
This directory is mapped to the root of your website:
; actual file is stored in /resources/css/app.css
[:link {:rel "stylesheet" :href "/app.css"}]
The src
directory is used to store components
(re-usable bits of html), and your application code, one file for each set of routes.
The test
directory is used to store all your application tests.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close