improvements for final version of parcel2

This commit is contained in:
2021-10-31 18:33:03 +01:00
parent 9d103f5f34
commit b591d190d4
24 changed files with 9085 additions and 5522 deletions

View File

@@ -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"]}

View File

@@ -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