fn: rename from fnctl (#321)

* fn: rename from fnctl

* fn: predicting the release version for installer

* fn: predicting the release version for installer
This commit is contained in:
C Cirello
2016-11-21 17:24:26 +01:00
committed by GitHub
parent 0343c4990c
commit c0512a4cbd
45 changed files with 172 additions and 172 deletions

View File

@@ -4,15 +4,15 @@ This example will show you how to test and deploy Go (Golang) code to IronFuncti
```sh
# create your func.yaml file
fnctl init <YOUR_DOCKERHUB_USERNAME>/hello
fn init <YOUR_DOCKERHUB_USERNAME>/hello
# build the function
fnctl build
fn build
# test it
cat hello.payload.json | fnctl run
cat hello.payload.json | fn run
# push it to Docker Hub
fnctl push
fn push
# Create a route to this function on IronFunctions
fnctl routes create myapp /hello
fn routes create myapp /hello
```
Now you can call your function on IronFunctions:
@@ -23,5 +23,5 @@ curl -H "Content-Type: application/json" -X POST -d @hello.payload.json http://l
## Dependencies
Be sure you're dependencies are in the `vendor/` directory and that's it.
Be sure you're dependencies are in the `vendor/` directory and that's it.

View File

@@ -4,15 +4,15 @@ This example will show you how to test and deploy a Node function to IronFunctio
```sh
# create your func.yaml file
fnctl init <YOUR_DOCKERHUB_USERNAME>/hello
fn init <YOUR_DOCKERHUB_USERNAME>/hello
# build the function
fnctl build
fn build
# test it
cat hello.payload.json | fnctl run
cat hello.payload.json | fn run
# push it to Docker Hub for use with IronFunctions
fnctl push
fn push
# Create a route to this function on IronFunctions
fnctl routes create myapp /hello
fn routes create myapp /hello
```
Now surf to: http://localhost:8080/r/myapp/hello
@@ -27,7 +27,7 @@ Run:
docker run --rm -v "$PWD":/function -w /function iron/node:dev npm install
```
Then everything should work.
Then everything should work.
For example, using the `package.json` file in this directory which includes the [request](https://www.npmjs.com/package/request) package, you can add this to func.js and it will work:
@@ -35,7 +35,7 @@ For example, using the `package.json` file in this directory which includes the
var request = require('request');
request('http://www.google.com', function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body) // Show the HTML for the Google homepage.
console.log(body) // Show the HTML for the Google homepage.
}
})
```

View File

@@ -21,7 +21,7 @@ the moment you try to test this function.
### 2. Build:
```sh
fnctl publish
fn publish
```
`-v` is optional, but it allows you to see how this function is being built.
@@ -31,7 +31,7 @@ fnctl publish
Now you can start jobs on your function. Let's quickly queue up a job to try it out.
```sh
cat hello.payload.json | fnctl run phpapp /hello
cat hello.payload.json | fn run phpapp /hello
```
Here's a curl example to show how easy it is to do in any language:

View File

@@ -22,7 +22,7 @@ the moment you try to test this function.
### 2. Build:
```sh
fnctl publish
fn publish
```
`-v` is optional, but it allows you to see how this function is being built.
@@ -32,7 +32,7 @@ fnctl publish
Now you can start jobs on your function. Let's quickly queue up a job to try it out.
```sh
cat hello.payload.json | fnctl run pythonapp /hello
cat hello.payload.json | fn run pythonapp /hello
```
Here's a curl example to show how easy it is to do in any language:

View File

@@ -4,17 +4,17 @@ This example will show you how to test and deploy a Ruby function to IronFunctio
```sh
# create your func.yaml file
fnctl init <YOUR_DOCKERHUB_USERNAME>/hello
fn init <YOUR_DOCKERHUB_USERNAME>/hello
# install dependencies, we need the json gem to run this
docker run --rm -v "$PWD":/worker -w /worker iron/ruby:dev bundle install --standalone --clean
# build the function
fnctl build
fn build
# test it
cat hello.payload.json | fnctl run
cat hello.payload.json | fn run
# push it to Docker Hub for use with IronFunctions
fnctl push
fn push
# Create a route to this function on IronFunctions
fnctl routes create myapp /hello
fn routes create myapp /hello
```
Now surf to: http://localhost:8080/r/myapp/hello