Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/KazuCocoa/revision_plate_ex
Plug application and middleware that serves endpoint returns application's REVISION.
https://github.com/KazuCocoa/revision_plate_ex
Last synced: 8 days ago
JSON representation
Plug application and middleware that serves endpoint returns application's REVISION.
- Host: GitHub
- URL: https://github.com/KazuCocoa/revision_plate_ex
- Owner: KazuCocoa
- License: mit
- Created: 2016-01-06T14:10:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-27T13:46:05.000Z (about 6 years ago)
- Last Synced: 2024-10-27T17:22:37.953Z (12 days ago)
- Language: Elixir
- Homepage:
- Size: 25.4 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Plug application and middleware that serves endpoint returns application's REVISION. (Framework Components)
- fucking-awesome-elixir - revision_plate_ex - Plug application and middleware that serves endpoint returns application's REVISION. (Framework Components)
- awesome-elixir - revision_plate_ex - Plug application and middleware that serves endpoint returns application's REVISION. (Framework Components)
README
[![](https://img.shields.io/hexpm/v/revision_plate_ex.svg?style=flat)](https://hex.pm/packages/revision_plate_ex)
[![Build Status](https://travis-ci.org/KazuCocoa/revision_plate_ex.svg?branch=support_over_elixir_13)](https://travis-ci.org/KazuCocoa/revision_plate_ex)# RevisionPlateEx
Plug application and middleware that serves endpoint returns application's REVISION.
See also [revision_plate](https://github.com/sorah/revision_plate) which is implemented with Ruby.
Document is [here](http://hexdocs.pm/revision_plate_ex/api-reference.html).
## Requirement
Elixir ~> 1.4
## Quick use as standalone server
1. Add revision_plate_ex to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:revision_plate_ex, "~> 0.4.1"}]
end
```2. Ensure revision_plate_ex is started before your application:
```elixir
def application do
[applications: [:revision_plate_ex]]
end
```3. Create `REVISION` file in root path.
4. Start application
5. Access to `http://localhost:4000/hello/revision` via browser, then the server return binary written in `REVISION`## Use with Phoenix
Read document associated with `RevisionPlateEx.Hello.revision/1`
## Configurations
Can use two configurations.
```elixir
use Mix.Configconfig :revision_plate_ex,
http_port: 8000, # Used only standalone mode. Default is `4000`.
file_path: "REVISION" # Used anyone would like to customize path to revision file. Default is "REVISION".
```# LICENSE
MIT. Read LICENSE file.