Skip to content

scotthaleen/pedestal-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pedestal Sample Project

Build Status

Project Setup

brew install leiningen

Create a profiles.clj in the root of the project and add custom overrides

{ :profiles/dev { :jvm-opts ["-Dhttp.port=8080"] }}

Quick Start

$ lein run

$ curl localhost:4000/ruok
;;=> imok%

Dev

Clojure Reload Workflow

lein repl

;; start application
user=> (go)

;; refesh code
user=> (reset)

;; run tests
user=> (test)

Deployable

lein uberjar

$ java -cp target/sample-web-*-standalone.jar -Dhttp.port=8080 sample.app

$ curl localhost:8080/ruok

Examples

$ curl localhost:4000/ruok
imok%

$ curl localhost:4000/store/get/foo
bar%

$ curl localhost:4000/store/get/foo1
key not found foo1%

$ curl -X POST localhost:4000/store/put/foo1 -d '{"foo1": "42"}'
 json object posted %

$ curl -X POST -H "Content-type: application/json" localhost:4000/store/put/foo1 -d '{"foo1": "42"}'
ok%

$ curl localhost:4000/store/get/foo1
{:foo1 "42"}%

Documentation:

12factor.net
Pedestal
Component

About

Sample Pedestal Project with System Components

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published