mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
functions: 0.0.28 release
This commit is contained in:
10
README.md
10
README.md
@@ -41,7 +41,15 @@ And how about a [slackbot](https://github.com/treeder/slackbots/tree/master/gupp
|
||||
curl -H "Content-Type: application/json" -X POST -d '{"path":"/guppy","image":"treeder/guppy:0.0.2", "content_type": "application/json"}' http://localhost:8080/api/v1/apps/myapp/routes
|
||||
```
|
||||
|
||||
You'all also get a custom URL like this when in production.
|
||||
### Using IronFunctions Hosted by Iron.io
|
||||
|
||||
Simply point to https://functions.iron.io instead of localhost and add your Iron.io Authentication header (TODO: link), like this:
|
||||
|
||||
```sh
|
||||
curl -H "Authorization: Bearer IRON_TOKEN" -H "Content-Type: application/json" -X POST -d '{"name":"APP_NAME"}' https://functions.iron.io/api/v1/apps
|
||||
```
|
||||
|
||||
And you'll get an ironfunctions.com host:
|
||||
|
||||
```
|
||||
APP_NAME.ironfunctions.com/PATH
|
||||
|
||||
@@ -102,7 +102,7 @@ func (r *NewApp) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
return
|
||||
}
|
||||
log.Infoln("registered app:", app)
|
||||
v := map[string]interface{}{"app": app}
|
||||
v := map[string]interface{}{"app": app, "msg": "App created successfully."}
|
||||
SendSuccess(w, "App created successfully.", v)
|
||||
}
|
||||
|
||||
@@ -140,7 +140,8 @@ func NewRoute(w http.ResponseWriter, req *http.Request) {
|
||||
return
|
||||
}
|
||||
log.Infoln("Route created:", route)
|
||||
fmt.Fprintln(w, "Route created successfully.")
|
||||
v := map[string]interface{}{"url": fmt.Sprintf("http://%v%v", app.Dns, route.Path), "msg": "Route created successfully."}
|
||||
SendSuccess(w, "Route created successfully.", v)
|
||||
}
|
||||
|
||||
func getRoute(host string) (*Route, error) {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package api
|
||||
|
||||
const Version = "0.0.27"
|
||||
const Version = "0.0.28"
|
||||
|
||||
Reference in New Issue
Block a user