0.1.8 • Published 8 years ago

axel-js v0.1.8

Weekly downloads
3
License
BSD-3-Clause
Repository
github
Last release
8 years ago

#axel-js

A lightweight download accelerator. Similar to axel.axel-js tries to accelerate the downloading process by using multiple connections for one file and supports HTTP and HTTPS protocols.

#Install

npm install axel-js

#Usage

var axel = require('axel-js');

axel.download('http://nginx.org/download/nginx-1.11.5.tar.gz', {
    output: './nginx.tar.gz',
    quiet: false,
    verbose: false,
    numConnections: 3,
    header: []
}).then((data) => {
    //download finished
    console.log(data);
    // => {
    // url: '<string>',
    // size: <number>,
    // startTime: '<Date>',
    // endTime: '<Date>'
    //}
}).catch((error) => {
    //an error occurred
});

#API

##download(url,options)

  • url string of the file URL to download
  • options object with options
    • numConnections
    • verbose
    • quiet
    • output

returns a promise object

##getErrorCode()

returns an object containing error code

#CLI

Usage:axel-js [options] url

Available Options:
-n, --num-connections <NUM-CONNECTION>
                Specify maximum number of connections
-o, --output <OUTPUT>
                Specify local output file
-H, --header <HEADER>
                Add header string
-v, --verbose   More status information
-q, --quiet      No output to stdout
-h, --help      Display this help message
0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago