Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

fnd

fnd, short for "function daemon", is a daemon program capable of storing
and running ruby code on demand. Think of it as a dynamic API.

How it works

Consider the following Ruby code:

# say_hello.rb
"Hello #{name}"

You can upload it to the fnd daemon by running:

$ fn upload say_hello.rb --to localhost:8080

Once uploaded, the daemon loads your code and hosts it through a HTTP API.
For instance, you can invoke it from the command-line with:

$ curl -d "{\"name\":\"fnd\"}" http://localhost:8080/say_hello -H "Content-type: application/json"
Hello fnd

Installation

$ gem install fnd

Alternatively use our Docker image dieb/fnd:

$ docker pull dieb/fnd

Usage

Run the fnd daemon:

$ fnd
[2015-01-04 01:04:55] INFO  WEBrick 1.3.1
[2015-01-04 01:04:55] INFO  ruby 2.0.0 (2014-01-12) [x86_64-linux-gnu]
[2015-01-04 01:04:55] INFO  WEBrick::HTTPServer#start: pid=1 port=8080

Or if you prefer through Docker:

$ docker run --rm -ti -p 8080:8080 dieb/fnd
[2015-01-04 01:04:55] INFO  WEBrick 1.3.1
[2015-01-04 01:04:55] INFO  ruby 2.0.0 (2014-01-12) [x86_64-linux-gnu]
[2015-01-04 01:04:55] INFO  WEBrick::HTTPServer#start: pid=1 port=8080

License

MIT License. See LICENSE for details.

Copyright

Copyright (c) 2014-2015 André Dieb Martins

Docker Pull Command
Owner
dieb
Source Repository

Comments (0)