Skip to content

kaibra/ms-httpkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ms-httpkit

This is a small addon for mount-ms derived from the tesla-microservice.
Usage:

(ns kaibra.ms-httpkit.example
  (:require
    [kaibra.ms-httpkit :as httpk]
    [compojure.core :as c]
    [mount.core :refer [defstate]]))

(def first-example-route
  (c/GET "/example1" []
    {:status 200
     :body   "<html><body><h1>MOUNT-MS example 1</h1></body></html>"}))

(def second-example-route
  (c/GET "/example2" []
    {:status 200
     :body   "<html><body><h1>MOUNT-MS example 2</h1></body></html>"}))

(defstate server
          :start (httpk/start-server
                   first-example-route
                   second-example-route)
          :stop (httpk/stop-server server))

kaibra

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published