https://github.com/kostya/eye-http
Http interface for the Eye gem
https://github.com/kostya/eye-http
Last synced: 6 months ago
JSON representation
Http interface for the Eye gem
- Host: GitHub
- URL: https://github.com/kostya/eye-http
- Owner: kostya
- License: mit
- Created: 2014-05-09T15:21:31.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-03-17T06:33:28.000Z (over 7 years ago)
- Last Synced: 2025-04-17T03:15:18.627Z (7 months ago)
- Language: Ruby
- Homepage:
- Size: 13.7 KB
- Stars: 10
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Eye::Http
---------
Http interface for the [Eye](http://github.com/kostya/eye) gem.
## Installation
gem install eye
gem install eye-http
## Gemfile
```ruby
group 'eye' do
gem 'eye'
gem 'eye-http'
end
```
## Usage
Example config:
```ruby
require 'eye-http'
Eye.config do
http :enable => true, :host => "127.0.0.1", :port => 12345
end
Eye.application :app do
process :process do
start_command "sleep 100"
daemonize true
pid_file "/tmp/1.pid"
end
end
```
Run:
bundle exec eye l examples/1.eye
Api:
curl http://127.0.0.1:12345/api/info?filter=all
curl -X PUT http://127.0.0.1:12345/api/restart?filter=all