GithubHelp home page GithubHelp logo

imclab / dropshare Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stanleystuart/dropshare

0.0 1.0 0.0 1.26 MB

A min.us / ge.tt file share clone.

Home Page: http://dropsha.re

License: Apache License 2.0

Shell 15.52% JavaScript 52.96% HTML 11.68% CSS 17.83% Python 2.01%

dropshare's Introduction

Dropshare

DropShare is the answer to the age-old question of File Transfer:

File Transfer

Similar services include

Clients

A few different clients are avaible.

Web

With the web-client you can drag-n-drop or use the normal upload/download.

http://dropsha.re

Commandline

Usage

dropshare /path/to/file.ext

# Example - share your public ssh key with someone
dropshare ~/.ssh/id_rsa.pub

Example Output

Your file, Sir! (or Ma'am):

http://dropsha.re/#foHsCQA

wget 'http://api.dropsha.re/files/foHsCQA/[email protected]'

curl 'http://api.dropsha.re/files/foHsCQA' -o '[email protected]'

Python Client

sudo wget 'https://raw.github.com/SpotterRF/dropshare/master/clients/dropshare.py' -O '/usr/local/bin/dropshare'
sudo chmod a+x '/usr/local/bin/dropshare'

Bash Client

sudo wget 'https://raw.github.com/SpotterRF/dropshare/master/clients/dropshare.sh' -O '/usr/local/bin/dropshare'
sudo chmod a+x '/usr/local/bin/dropshare'

Server

If you're interested in consulting or setup to run DropShare on your private network at your Home Office, or Business please contact [email protected].

Quick Start for Running your own DropShare

If you don't want to customize it at all you can install it via npm

  1. Download NodeJS
  2. npm install -g dropshare
  3. dropshare-server
  4. The database will be in dropshare/server/lib/db/db.json

But for production use with a real database

  1. Install NodeJS: Linux Binary | Linux Source | OS X | Windows.

  2. Install redis. See Appendix (below) for installing redis on OS X.

    Ubuntu Linux

    sudo apt-get install redis-server

    OS X

    brew install redis launchctl load -w ~/Library/LaunchAgents/io.redis.redis-server.plist

    see notes below

  3. Install jade, Pakmanager, less, and some other fun things.

    npm install -g jade less pakmanager uglify-js

  4. Install dropshare in your webapps directory (I use connect-vhoster)

    use mine (or use your own fork)

    git clone git://github.com/SpotterRF/dropshare.git dropshare.example.com

  5. Copy config.default.js to config.js, and customize any server settings you would like.

    cd dropshare.example.com rsync -a config.default.js config.js

  6. Download dependencies and compile the static assets. (You may wish to look at deploy.sh to understand what it does)

    ./deploy.sh # possibly needs sudo

  7. Start the server. By default it runs on port 3700 (but if it's different, you'll see it).

    node bin/dropshare-server.js

Server Parameters

The server can take parameters in a few forms. If you are just running a stand-alone server, then you can put them in the config.js file. If you are creating a Dropshare server in code, then you can pass an object in to the create() method exported by lib/index.js.

The parameters all have sensible defaults that should work out of the box, so you don't actually need any of them.

  • client: the path to the public folder for the browser interface. Defaults to ./public
  • storageDir: a path to a directory to store uploaded files. Defaults to ./files.
  • allowUserSpecifiedIds: if true, allow users to specify the ids that files will be stored under.

Running Tests

Run the tests with:

cd tests
./test.sh

The tests depend on being in the same directory as the test script, due to paths to resources and such.

LICENSE

Dropshare is available under the following licenses:

  • MIT
  • Apache 2

Copyright 2011 - 2012 Jamison Dance and AJ ONeal

Appendix

Installing Redis

brew install redis

mkdir -p ~/Library/LaunchAgents

launchctl unload -w ~/Library/LaunchAgents/io.redis.redis-server.plist 2>/dev/null || true
cp /usr/local/Cellar/redis/2.2.12/io.redis.redis-server.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/io.redis.redis-server.plist

To start redis manually:

redis-server /usr/local/etc/redis.conf

To access the server: redis-cli

Ubuntu Linux

sudo apt-get install redis-server # may be called just 'redis', depending on your distro

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.