Skip to content

A Leiningen template to create web applications using the Bract/Gossamer micro web framework

License

Notifications You must be signed in to change notification settings

bract/gossamer.lein-template

Repository files navigation

gossamer.lein-template

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

Out of the box features

  • 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 modules/Libraries used

Usage

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

License

Copyright © 2018-2021 Shantanu Kumar

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

A Leiningen template to create web applications using the Bract/Gossamer micro web framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published