Giter Club home page Giter Club logo

servant-static-th's Introduction

Servant.Static.TH

Build Status Hackage Stackage LTS Stackage Nightly BSD3 license

servant-static-th allows you to embed a directory of static files in your application and serve them from your Servant server

For documentation and usage examples, see the documentation on Hackage.

servant-static-th's People

Contributors

arowm avatar cdepillabout avatar spencertipping avatar vendamere avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

servant-static-th's Issues

Building with cabal

Has anybody experience using this package with cabal?

My problem is that the FilePaths can only be resolved if I give the absolute Path, but I would like the package to be self-contained.
Specifying data-dir in the .cabal file and accessing the file via getDataDir does not work since the files are needed at compile-time, not at runtime.

Long compile time on 100K~ bytes static files

It takes long compile time when one of the front-end files becomes to be around 100K bytes.
A 100K bytes js files are likely such as one it imports babel-polyfill.

After installing dependent libraries,
stack build --flag servant-static-th:buildexample takes

It must be a sort of bottleneck to let people to use this fantastic servant-static-th in real world applications.

Compressed assets

Hi,

I wonder if it's possible to modify the public API of this library in a way that would allow embedding of compressed assets? The idea is to apply the most aggressive gzip compression on JS/CSS assets as part of a build pipeline, so that they are served directly as gzipped resources without having to spend CPU cycles on on-the-fly encoding.

Serving root path

Is there a way to configure servant-static-th to map particular file to / path? Based on the documentation there doesn't seem to be a way to do this currently. Is there a way around this limitation?

Type-safe links?

Is there a recommended way of generating type-safe links for a directory who's API has been created by createApiAndServerDecs?

Unknown extension type "map"

These are source-map files for minified / uglified CSS/JS files. There should probably be a config option in the user-facing API which controls whether these files should be served, or not.

Files that has to be ignored and not served

Hello,
I have static files (.sass) that do not need to be served but ignored by the extensionToMimeTypeInfoEx function
Right now, it fails with "unknown extension type"
Do you have a plan for such issue already ?
Thanks for your reply.
Alexandre

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.