An opinionated Leiningen template to create web applications using the Bract/Gossamer micro web framework. The template is minimal but can be easily extended, thanks to Bract, in various ways.
Latest version (on Clojars): 0.3.1
- CLI options
- Available when running as uberjar
- Commands to run app, specify config files, print config etc.
- Extensible: Custom application commands may be added
- Configuration
- Running as uberjar: Specify via CLI, In development: By convention
- Configuration files may be chained to multiple parent files
- Variable substitution support in configuration files
- Configuration files may be placed in classpath or filesystem
- Development workflow
- Tweaking verbosity and configuration at the REPL
- Easy customizable integration with clojure.test (any test framework)
- REPL support for starting/stopping/reloading app (Reloaded workflow)
- Logging
- JSON, Text and Console logging are available by default
- Provided extensively customizable Logback configuration
- Web
- Ring based request serving and middleware
- Feature flag based middleware application
- Data-driven web routing using Ring-handler
- Included Aleph web server, easily swappable
- bract.core
- Keypin for configuration files
- bract.cli
- tools.cli for CLI argument parsing
- bract.ring
- gossamer.core
- bract.dev
- tools.namespace for namespace reloading (dev mode)
lein new gossamer {{project-name}}
cd {{project-name}}
lein ring server-headless # start web server in dev mode
lein do clean, uberjar # generate uberjar
java -jar {{project-name}}-{{version}}-standalone.jar -vf config/config.edn # run uberjar
lein test
lein repl
Copyright © 2018-2021 Shantanu Kumar
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.