https://github.com/vitalygashkov/molnia
Fast and lightweight library for downloading files
https://github.com/vitalygashkov/molnia
async concurrency download file http nodejs
Last synced: 8 months ago
JSON representation
Fast and lightweight library for downloading files
- Host: GitHub
- URL: https://github.com/vitalygashkov/molnia
- Owner: vitalygashkov
- License: agpl-3.0
- Created: 2024-03-21T18:31:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-05T09:19:28.000Z (almost 2 years ago)
- Last Synced: 2024-09-05T17:01:21.264Z (almost 2 years ago)
- Topics: async, concurrency, download, file, http, nodejs
- Language: JavaScript
- Homepage: https://npmjs.com/package/molnia
- Size: 272 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# molnia
[](https://www.npmjs.com/package/molnia)

[](https://www.npmjs.com/package/molnia)
Utility for easy file downloading: fast, lightweight, cross-platform and flexible.
## Description
A file download utility written in JavaScript with minimal dependencies. It can be used both as a command line interface and as a library for use in third-party Node.js projects.
## Quick start
### Command-line interface
Download and install [Node.js](https://nodejs.org/en/download/). Run app:
```
npx molnia [options] url1 [url2] [url...]
```
Example:
```
npx molnia --output C:\Users\John\Downloads\10Mb.dat https://proof.ovh.net/files/10Mb.dat
```
### Library
Install package using NPM:
```
npm i molnia
```
Use in your project:
```js
import { download } from 'molnia';
const options = { output: `C:\Users\John\Downloads\10Mb.dat` };
await download('https://proof.ovh.net/files/10Mb.dat', options);
```
## Features
- **Concurrency**: chunk download queue with size limitations
- **Retry** in case of request failure
- **Proxy** support
- **Multiple protocols** support: HTTP, HTTPS
- **Minimal dependencies** and reduced code size
- **Command-line interface**