Functions is an open source serverless computing platform for any cloud - private, public, or hybrid.
With Functions, CPU heavy tasks seamlessly run in the background. Simply Implement Functions directly into your application, quickly set up your infrastructure and job proccessing, and then focus on building great software, hassle free.
Set up your Functions API
docker run --rm --name functions --privileged -it -e "DB=bolt:///app/data/bolt.db" -v $PWD/data:/app/data -p 8080:8080 iron/functions
This command will quickly start Functions using an embedded Bolt
database running on :8080
.
An application is essentially a grouping of functions which when put together form an API. Create your app with the following code.
curl -H "Content-Type: application/json" -X POST -d '{
"app": { "name":"myapp" }
}' http://localhost:8080/v1/apps
curl -H "Content-Type: application/json" -X POST -d '{
"route": {
"path":"/hello",
"image":"iron/hello"
}
}' http://localhost:8080/v1/apps/myapp/routes
Adding a function route will automatically generate your app's URL. Click on the link to view your newly started project.
Isn't it beautiful?
curl http://localhost:8080/r/myapp/hello
For more API configuration, see the API README
Get off to a smooth start with our quickstart guide.
Iron is currently hosting Functions for select customers. If you're interested in a hosted solution, drop us a line and we can discuss deployment options.