Giter VIP home page Giter VIP logo

Comments (1)

retrohacker avatar retrohacker commented on August 28, 2024

Hey @zyrolasting,

Thank you for opening this issue! We know serveStatic has quite a few short-comings. In fact, its almost easier at this point to just wire the fs module directly up to restify as opposed to trying to use this middleware. To answer your question, your approach looks pretty sane from a high level.

serveStatic has been a point of contention for a while. Dicussion is fragmented across a few different issues over at https://github.com/restify/node-restify

I believe the current plan is to eventually move serveStatic out into it's own module outside of the restify repo. The thought process is that restify is designed for building semantically correct, production ready, REST services designed for scale. Serving static content is outside of that wheelhouse. In addition, Node.js isn't the best at serving static content, you often get better mileage by fronting your restify service with NGinx for that use case. We know a lot of people are building webapps with restify, and that serving static content directly from Node.js simplifies that use case, so we are going to try to do this with care. If you would be interested in helping with that effort, or just want to chime in on the discussion, let us know ❤️

In the meantime, we are merging the plugins back into the core restify repo. Feel free to open an issue over there if you still have questions and I would be happy to help 😄

from plugins.

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.