forked from GitHub/gf-core
Show version & configuration info when gf -server starts
This commit is contained in:
@@ -24,7 +24,9 @@ import Codec.Binary.UTF8.String(encodeString)
|
|||||||
import GF.Infra.UseIO(readBinaryFile,writeBinaryFile)
|
import GF.Infra.UseIO(readBinaryFile,writeBinaryFile)
|
||||||
import qualified PGFService as PS
|
import qualified PGFService as PS
|
||||||
import qualified ExampleService as ES
|
import qualified ExampleService as ES
|
||||||
import Paths_gf(getDataDir)
|
import Data.Version(showVersion)
|
||||||
|
import Paths_gf(getDataDir,version)
|
||||||
|
import GF.Infra.BuildInfo (buildInfo)
|
||||||
import RunHTTP(cgiHandler)
|
import RunHTTP(cgiHandler)
|
||||||
|
|
||||||
-- * HTTP server
|
-- * HTTP server
|
||||||
@@ -34,6 +36,9 @@ server execute1 state0 =
|
|||||||
datadir <- getDataDir
|
datadir <- getDataDir
|
||||||
let root = datadir</>"www"
|
let root = datadir</>"www"
|
||||||
port = 41296
|
port = 41296
|
||||||
|
putStrLn $ "This is GF version "++showVersion version++"."
|
||||||
|
putStrLn buildInfo
|
||||||
|
putStrLn $ "Document root = "++root
|
||||||
putStrLn $ "Starting HTTP server, open http://localhost:"
|
putStrLn $ "Starting HTTP server, open http://localhost:"
|
||||||
++show port++"/ in your web browser."
|
++show port++"/ in your web browser."
|
||||||
setCurrentDirectory root
|
setCurrentDirectory root
|
||||||
|
|||||||
Reference in New Issue
Block a user