mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Merge pull request #31 from fcoury/test_apps
Added test apps for Go, PHP and Python
This commit is contained in:
1
tests/go/.godir
Normal file
1
tests/go/.godir
Normal file
@@ -0,0 +1 @@
|
||||
go
|
||||
1
tests/go/Procfile
Normal file
1
tests/go/Procfile
Normal file
@@ -0,0 +1 @@
|
||||
web: go
|
||||
20
tests/go/web.go
Normal file
20
tests/go/web.go
Normal 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
8
tests/php/index.php
Normal 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
1
tests/python/Procfile
Normal file
@@ -0,0 +1 @@
|
||||
web: gunicorn hello:app
|
||||
8
tests/python/hello.py
Normal file
8
tests/python/hello.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import os
|
||||
from flask import Flask
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def hello():
|
||||
return 'Hello World!'
|
||||
5
tests/python/requirements.txt
Normal file
5
tests/python/requirements.txt
Normal file
@@ -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