Popularity
1.7
Growing
Activity
0.0
Stable
0
1
1

Monthly Downloads: 26
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Web     Wai    

wai-middleware-static-embedded alternatives and similar packages

Based on the "wai" category

Do you think we are missing an alternative of wai-middleware-static-embedded or a related project?

Add another 'wai' Package

README

Static embedded middleware

A middleware to serve static files from memory. Works particularly well with file-embed.

Example usage

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}

import Network.Wai.Middleware.StaticEmbedded -- This package
import Data.FileEmbed -- file-embed
import Web.Scotty -- scotty

main :: IO ()
main = scotty 1337 $ do
  middleware (static $(embedDir ".")) -- serves the source directory
  notFound (text "404: Not found!")