summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2011-10-12 19:00:42 +0000
committerhallgren <hallgren@chalmers.se>2011-10-12 19:00:42 +0000
commitbd7cb1ab41cd9b873ddc619bd5e74507366d26f6 (patch)
treeebe00a1991c4af6b2a32d25676ba5fc1cc092283
parent8266df8f5898ea8c3a6a5179e905f8a2c5c950a7 (diff)
Show version & configuration info when gf -server starts
-rw-r--r--src/compiler/GFServer.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/GFServer.hs b/src/compiler/GFServer.hs
index 4b796efce..8fe0c3294 100644
--- a/src/compiler/GFServer.hs
+++ b/src/compiler/GFServer.hs
@@ -24,7 +24,9 @@ import Codec.Binary.UTF8.String(encodeString)
import GF.Infra.UseIO(readBinaryFile,writeBinaryFile)
import qualified PGFService as PS
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)
-- * HTTP server
@@ -34,6 +36,9 @@ server execute1 state0 =
datadir <- getDataDir
let root = datadir</>"www"
port = 41296
+ putStrLn $ "This is GF version "++showVersion version++"."
+ putStrLn buildInfo
+ putStrLn $ "Document root = "++root
putStrLn $ "Starting HTTP server, open http://localhost:"
++show port++"/ in your web browser."
setCurrentDirectory root