improvements for final version of parcel2
This commit is contained in:
@@ -6,6 +6,7 @@ module Main where
|
||||
import Data.Semigroup ((<>))
|
||||
import Network.Wai.Application.Static
|
||||
import Network.Wai.Handler.Warp
|
||||
import Network.Wai.Middleware.RequestLogger
|
||||
import Options.Applicative
|
||||
import System.FilePath
|
||||
import WaiAppStatic.Types
|
||||
@@ -27,4 +28,4 @@ main = do
|
||||
Config {..} <- execParser $ info configP fullDesc
|
||||
putStrLn $ "Location: " ++ location
|
||||
putStrLn $ "Port: " ++ show port
|
||||
run port . staticApp $ (defaultWebAppSettings location) {ssIndices = fromMaybe [] $ toPieces ["index.html"]}
|
||||
run port . logStdout . staticApp $ (defaultWebAppSettings location) {ssIndices = fromMaybe [] $ toPieces ["index.html"]}
|
||||
|
||||
@@ -13,6 +13,7 @@ dependencies:
|
||||
- filepath
|
||||
- optparse-applicative
|
||||
- wai
|
||||
- wai-extra
|
||||
- wai-app-static
|
||||
- warp
|
||||
|
||||
@@ -25,4 +26,3 @@ executables:
|
||||
source-dirs: app/
|
||||
dependencies:
|
||||
- *name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user