mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Updated API index reponse, more friendly. (#511)
This commit is contained in:
committed by
Seif Lotfy سيف لطفي
parent
679d50602e
commit
27123a0609
@@ -7,5 +7,5 @@ import (
|
||||
)
|
||||
|
||||
func handlePing(c *gin.Context) {
|
||||
c.JSON(http.StatusNotImplemented, "Not Implemented")
|
||||
c.JSON(http.StatusOK, gin.H{"hello": "world!", "goto": "https://github.com/iron-io/functions"})
|
||||
}
|
||||
|
||||
17
build.ps1
17
build.ps1
@@ -4,6 +4,22 @@ $ErrorActionPreference = "Stop"
|
||||
$cmd = $args[0]
|
||||
Write-Host "cmd: $cmd"
|
||||
|
||||
|
||||
function quick() {
|
||||
try {
|
||||
go build
|
||||
if (-not $?) {
|
||||
Write-Host "build failed!" # WTH, error handling in powershell sucks
|
||||
exit
|
||||
}
|
||||
} catch {
|
||||
# This try/catch thing doesn't work, the above if statement does work though
|
||||
Write-Host "build failed 2!"
|
||||
exit
|
||||
}
|
||||
./functions
|
||||
}
|
||||
|
||||
function build () {
|
||||
docker run --rm -v ${pwd}:/go/src/github.com/iron-io/functions -w /go/src/github.com/iron-io/functions iron/go:dev go build -o functions-alpine
|
||||
docker build -t iron/functions:latest .
|
||||
@@ -15,6 +31,7 @@ function run () {
|
||||
|
||||
switch ($cmd)
|
||||
{
|
||||
"quick" {quick}
|
||||
"build" { build }
|
||||
"run" {run}
|
||||
default {"Invalid command: $cmd"}
|
||||
|
||||
Reference in New Issue
Block a user