The example in this directory shows how to use the Node.js package serve (which supports range requests) to serve a static Arrow IPC stream file over HTTP.
To run this example, copy the file random.arrows from the directory data/rand-many-types/ into the current directory:
cp ../../../../data/rand-many-types/random.arrows .
Then start the HTTP server to serve this file:
npx serve -l 8008
[!NOTE]
The npm packageserveshould automatically set theContent-Typeheader toapplication/vnd.apache.arrow.streamwhen serving a file with extension.arrows, because the Arrow IPC stream format is officially registered with IANA and most web servers includingserveuse registration data from IANA to determine the media type of a file based on its file extension and set theContent-Typeheader to that media type when serving a file with that extension. However, this is not working with.arrowsfiles in theservepackage, seemingly because of a problem with the npm packagemimedbwhichservedepends on. So the fileserve.jsonis used to set theContent-Typeheader correctly when serving.arrowsfiles.