Naughty Pterodactyl Maid
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    serve-filepublic

    serve-file

    NPM

    Like serve-static but for individual files. Refactored and decoupled from express res.sendFile. Can be used standalone with router to support HTTP/2 protocol.

    npm i -S serve-file

    Usage

    import Router from 'router'
    import serveFile from 'serve-file'
     
    const app = Router()
    app.use('/my-file.txt', serveFile('path/to/my-file.txt'))

    install

    npm i serve-file

    Downloadslast 7 days

    3

    version

    0.1.4

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar