https://github.com/b-ryan/farmhand-ui
Web interface for Farmhand
https://github.com/b-ryan/farmhand-ui
Last synced: 11 months ago
JSON representation
Web interface for Farmhand
- Host: GitHub
- URL: https://github.com/b-ryan/farmhand-ui
- Owner: b-ryan
- License: other
- Created: 2017-01-31T02:52:34.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-15T18:05:55.000Z (almost 7 years ago)
- Last Synced: 2025-01-10T20:52:58.556Z (about 1 year ago)
- Language: HTML
- Homepage: https://github.com/b-ryan/farmhand/
- Size: 226 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Farmhand UI
Farmhand UI is a web interface for
[Farmhand](https://github.com/b-ryan/farmhand), with features like:
- See all of your queues with how many jobs are pending for each of them
- Drop all pending jobs from your queues
- View lists of pending, scheduled, completed, and failed jobs
- Get details on individual jobs, like what function was called with what
arguments, what its status is, etc.
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Installation](#installation)
- [Usage](#usage)
- [Jetty](#jetty)
- [HTTP Kit](#http-kit)
- [Screenshot](#screenshot)
## Installation
Leiningen:
```clojure
[com.buckryan/farmhand-ui "0.3.1"]
```
## Usage
This library is meant to be use within an existing application running
Farmhand. This is not necessary, however, and you are free to run it in a
separate process. For now, we will assume you are going to run it inside your
existing application.
The `farmhand.ui.handler` namespace contains one main function for creating a
handler that can be used with Jetty, HTTP Kit, etc. Here is what the basic code
will look like to create an app:
```clojure
(ns my.namespace
(:require [farmhand.core :as farmhand]
[farmhand.ui.handler :as farmhand-ui]))
;; Start the Farmhand server before creating the handler
(farmhand/start-server)
;; Now create the handler
(def handler (farmhand-ui/app))
;; Now you need to start an HTTP server. See the notes below depending on the
;; server you are using.
```
### Jetty
```clojure
;; Using the handler created above,
(ring.adapter.jetty/run-jetty handler {})
```
See more details on `run-jetty`
[here](http://ring-clojure.github.io/ring/ring.adapter.jetty.html#var-run-jetty).
### HTTP Kit
```clojure
;; Using the handler created above,
(org.httpkit.server/run-server handler)
```
More documentation can be found
[here](http://www.http-kit.org/server.html#stop-server).
## Screenshot
