Direct file download in Node.js, using libcurl.
The goal of this module is to avoid sending data in JavaScript-land; while piping works perfectly fine, it also increases CPU usage for no good reason when all we want is to download a file to disk.
So this module simply pipes libcurl to a file, all in C/C++.
Requirements
Currently tested on Windows 10 and macOS.
- CMake 3.5+
Installation
npm install --save Curlyfile
Usage
const Curlyfile = Curlyfileconst curly = curly
Development
git clone ...cd curlyfilegit submodule update --init# Or any cmake.js command - npm run -- cmake -h for more details npm run cmake build
Todo
- Proper tests
- Cancel API
- Progress API (# of bytes downloaded so far)
- Prebuild for Node.js and Electron