Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 24, 2024 via pnpm

send 0.18.0

Better streaming static file server with Range and conditional-GET support
Package summary
Share
0
issues
2
licenses
17
MIT
2
ISC
Package created
4 Jul 2012
Version published
24 Mar 2022
Maintainers
1
Total deps
19
Direct deps
13
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
17 Packages, Including:
debug@2.6.9
depd@2.0.0
destroy@1.2.0
ee-first@1.1.1
encodeurl@1.0.2
escape-html@1.0.3
etag@1.8.1
fresh@0.5.2
http-errors@2.0.0
mime@1.6.0
ms@2.0.0
ms@2.1.3
on-finished@2.4.1
range-parser@1.2.1
send@0.18.0
statuses@2.0.1
toidentifier@1.0.1

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
inherits@2.0.4
setprototypeof@1.2.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

13
All Dependencies CSV
β“˜ This is a list of send 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
debug2.6.916.13 kBMIT
prod
depd2.0.08.18 kBMIT
prod
destroy1.2.03.3 kBMIT
prod
encodeurl1.0.23.18 kBMIT
prod
escape-html1.0.31.87 kBMIT
prod
etag1.8.14.28 kBMIT
prod
fresh0.5.24.13 kBMIT
prod
http-errors2.0.06.19 kBMIT
prod
mime1.6.015.32 kBMIT
prod
ms2.1.32.9 kBMIT
prod
on-finished2.4.14.93 kBMIT
prod
range-parser1.2.13.52 kBMIT
prod
statuses2.0.14.57 kBMIT
prod

Visualizations

Frequently Asked Questions

What does send do?

Send is an advanced static file server library for Node.js. It facilitates the streaming of files from the file system as an HTTP response. Key features include support for partial responses (Ranges), conditional-GET negotiation (If-Match, If-Unmodified-Since, If-None-Match, If-Modified-Since), strong test coverage, and fine-grained events. Send does not perform internal caching on its own, implying that for caching purposes, you would need to use a reverse proxy cache such as Varnish or a Content Delivery Network (CDN). Additionally, you are also given the ability to serve up entire directories and individual specific files.

How do you use send?

To use send in your Node.js project, you need to first install the package using npm with the command npm install send. Once installed, requiring the library in your javascript file can be carried out with the line var send = require('send'). The general formula for usage is send(req, path, [options]).pipe(res), with replacement of req, path, and optionally options with your desired parameters. Here's an example of using send to serve a specific file:

var http = require('http')
var send = require('send')

var server = http.createServer(function onRequest (req, res) {
  send(req, '/path/to/index.html')
    .pipe(res)
})

server.listen(3000)

In this instance, send is being used to send a specified file (/path/to/index.html) to every request that is received on the server.

Where are the send docs?

The complete documentation for Send library is available on its GitHub page at git+https://github.com/pillarjs/send.git as well as on the npm module page at https://www.npmjs.org/package/send. These locations provide all the required information on how to use, install and manipulate the send functions, as well as how to operate different features like custom error-handling, caching, debugging, event handling etc.