Merge pull request #31 from fcoury/test_apps
Added test apps for Go, PHP and Python
This commit is contained in:
commit
47aad38840
7 files changed
+44
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
go
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
web: go
|
||||||
@@ -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")
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>PHP Test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php echo '<h3>Hello World</h3>'; ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
web: gunicorn hello:app
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import os
|
||||||
|
from flask import Flask
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
def hello():
|
||||||
|
return 'Hello World!'
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
Flask==0.9
|
||||||
|
Jinja2==2.6
|
||||||
|
Werkzeug==0.8.3
|
||||||
|
gunicorn==0.17.2
|
||||||
|
|
||||||
Reference in new issue
Block a user