summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-01 17:48:43 +0300
committerWolfy-J <[email protected]>2018-06-01 17:48:43 +0300
commitb02611b7266589d888e054a1d2e4432ae370617d (patch)
tree8e658d448aeb645ceff0229655fb53a542a84087 /cmd
parent91a081e3ec43302ca1df8d436e48c2a14d7c76b9 (diff)
file uploads support
Diffstat (limited to 'cmd')
-rw-r--r--cmd/rr-php/cmd/serve.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd/rr-php/cmd/serve.go b/cmd/rr-php/cmd/serve.go
index 69b53e28..24ec4043 100644
--- a/cmd/rr-php/cmd/serve.go
+++ b/cmd/rr-php/cmd/serve.go
@@ -20,8 +20,9 @@ import (
"os/exec"
"time"
"github.com/sirupsen/logrus"
- rrhttp "github.com/spiral/roadrunner/psr7"
+ rrttp "github.com/spiral/roadrunner/http"
"net/http"
+ "os"
)
func init() {
@@ -61,7 +62,7 @@ func serveHandler(cmd *cobra.Command, args []string) {
// Addr: ":8080",
// Handler: rrhttp.NewServer(
// rrhttp.Config{
- // ServeStatic: true,
+ // serveStatic: true,
// Root: "/Users/wolfy-j/Projects/phpapp/webroot",
// },
// rr,
@@ -73,10 +74,11 @@ func serveHandler(cmd *cobra.Command, args []string) {
//http2.ConfigureServer(&srv, nil)
//srv.ListenAndServeTLS("localhost.cert", "localhost.key")
- http.ListenAndServe(":8080", rrhttp.NewServer(
- rrhttp.Config{
+ http.ListenAndServe(":8080", rrttp.NewServer(
+ rrttp.Config{
ServeStatic: true,
Root: "/Users/wolfy-j/Projects/phpapp/webroot",
+ UploadsDir: os.TempDir(),
},
rr,
))