1
0
forked from GitHub/gf-core

Add flag --document-root for user with gf --server

This can make it easier to test cloud service updates before installing them.
This commit is contained in:
hallgren
2012-11-14 13:52:45 +00:00
parent 595a69ba0c
commit 2cc39661d9
3 changed files with 13 additions and 5 deletions

View File

@@ -47,12 +47,12 @@ import RunHTTP(cgiHandler)
debug s = logPutStrLn s
-- | Combined FastCGI and HTTP server
server port execute1 state0 =
server port optroot execute1 state0 =
do --stderrToFile logFile
state <- newMVar M.empty
cache <- PS.newPGFCache
datadir <- getDataDir
let root = datadir</>"www"
let root = maybe (datadir</>"www") id optroot
-- debug $ "document root="++root
setCurrentDirectory root
-- FCGI.acceptLoop forkIO (handle_fcgi execute1 state0 state cache)