Merge pull request #31 from fcoury/test_apps

Added test apps for Go, PHP and Python
This commit is contained in:
Jeff Lindsay
2013-06-20 23:04:50 -07:00
7 changed files with 44 additions and 0 deletions

1
tests/go/.godir Normal file
View File

@@ -0,0 +1 @@
go

1
tests/go/Procfile Normal file
View File

@@ -0,0 +1 @@
web: go

20
tests/go/web.go Normal file
View File

@@ -0,0 +1,20 @@
package main
import (
"fmt"
"net/http"
"os"
)
func main() {
http.HandleFunc("/", hello)
fmt.Println("listening...")
err := http.ListenAndServe(":"+os.Getenv("PORT"), nil)
if err != nil {
panic(err)
}
}
func hello(res http.ResponseWriter, req *http.Request) {
fmt.Fprintln(res, "hello, world")
}

8
tests/php/index.php Normal file
View File

@@ -0,0 +1,8 @@
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<h3>Hello World</h3>'; ?>
</body>
</html>

1
tests/python/Procfile Normal file
View File

@@ -0,0 +1 @@
web: gunicorn hello:app

8
tests/python/hello.py Normal file
View File

@@ -0,0 +1,8 @@
import os
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello World!'

View File

@@ -0,0 +1,5 @@
Flask==0.9
Jinja2==2.6
Werkzeug==0.8.3
gunicorn==0.17.2