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 0ef7b8a3b5
commit 586d7488f2
3 changed files with 13 additions and 5 deletions

View File

@@ -71,8 +71,11 @@ shell opts files = loop opts =<< runSIO (importInEnv emptyGFEnv opts files)
#ifdef SERVER_MODE
mainServerGFI opts0 port files =
server port (execute1 opts) =<< runSIO (importInEnv emptyGFEnv opts files)
where opts = beQuiet opts0
server port root (execute1 opts)
=<< runSIO (importInEnv emptyGFEnv opts files)
where
root = flag optDocumentRoot opts
opts = beQuiet opts0
#else
mainServerGFI opts files =
error "GF has not been compiled with server mode support"