From b02611b7266589d888e054a1d2e4432ae370617d Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Fri, 1 Jun 2018 17:48:43 +0300 Subject: file uploads support --- cmd/rr-php/cmd/serve.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cmd') 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, )) -- cgit v1.2.3