Giter Site home page Giter Site logo

[Feature Request]Static File serving about chi HOT 6 CLOSED

go-chi avatar go-chi commented on August 20, 2024
[Feature Request]Static File serving

from chi.

Comments (6)

pkieltyka avatar pkieltyka commented on August 20, 2024 5

Merged in #36 - see new mux.FileServer(path string, root http.FileSystem) method.. example usage: https://github.com/pressly/chi/blob/master/mux_test.go#L734-L743

from chi.

philippgille avatar philippgille commented on August 20, 2024 1

@pkieltyka: Is it correct that this functionality doesn't exist anymore, but instead you have to follow this example?

from chi.

pkieltyka avatar pkieltyka commented on August 20, 2024 1

yep, thats correct

from chi.

pkieltyka avatar pkieltyka commented on August 20, 2024

@netsharec I see what you mean. I'll add this function later today.

from chi.

fiorix avatar fiorix commented on August 20, 2024

Please allow it to take an http.FileSystem instead of directory so we can serve static files from memory. I often do that along with go-bindata.

from chi.

pkieltyka avatar pkieltyka commented on August 20, 2024

@fiorix good call

from chi.

Related Issues (20)

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.