0.2.6 • Published 9 years ago

chunkyjs v0.2.6

Weekly downloads
3
License
GPL-3.0
Repository
github
Last release
9 years ago

GitHub license GitHub version Codacy Badge Coverage Status Build Status

NPM

chunkyjs

An async upload/download node library leveraging express.js, which provides chunked transfer api's.

What do we mean by a chunked transfer api? Well, what chunkyjs does is provide an api interface that allows downloading or uploading multiple chunks of a file at the same time. This effectively allows you to multi-thread your applications data transfer logic.

chunkyjs also comes with prebuilt nodejs/iojs and web browser clients that can be used to facilitate access to the api in a front-end environment.

Installation

Installation is the same as any other module.

	npm install chunkyjs

Usage

Basic usage of chunkyjs is as simple as requiring the module and passing it into the expressjs app's use funtion

	var express = require('express'),
		app = express(),
		chunky = require('chunkyjs');
	
	app.use(chunky.chunked());
	app.listen(8080);

Datastore

chunkyjs is currently employing node-cache in order to store transfer specific metadata. This is great for development, however means that chunkyjs in its current state cannot be clustered. Support for clustered datastores is on the way.

Contributing

We welcome contributions, feel free to fork us and make as many PR's as you would like.

A few guide lines:

  • You should always rebase your branch on our latest master branch before making a PR.
  • We want to maintain a status quo when it comes to the code in chunkyjs. So any PR should satisfy our codacy rules, and maintain the A ranking we currently have.
  • Again to maintain the status quo all PR's should contain unit-tests that test the additional funcationality and/or bug fix(s).
  • Other than that happy coding