Skip to content

QR Sharing and drive server

Emmanuel Odeke edited this page Oct 21, 2015 · 3 revisions

In order for drive qr files... to work, firstly you'll need to make sure drive-server is running on a location of your choice and that your public and private keys match.

drive-server

$ go get -u -v github.com/odeke-em/drive/drive-server
$ DRIVE_SERVER_HOST=<yourHost> DRIVE_SERVER_PORT=<yourPort> DRIVE_SERVER_PUB_KEY=<yourPubKey> DRIVE_SERVER_PRIV_KEY=<yourPrivKey> drive-server

Or you can permanently setup your private and public keys like this

$ cat < ! >> ~/.bashrc && source ~/.bashrc
> export DRIVE_SERVER_HOST=<yourHost>
> export DRIVE_SERVER_PORT=<yourPort>
> export DRIVE_SERVER_PUB_KEY=<yourPubKey>
> export DRIVE_SERVER_PRIV_KEY=<yourPrivKey>
> !

Once drive-server is setup, you can run it by

$ drive-server

qr

$ go get -u -v github.com/odeke-em/drive/drive-gen && drive-gen
  • Make sure the DRIVE_SERVER_PUB_KEY and DRIVE_SERVER_PRIV_KEY match up with those on the host that will generate your QR codes. You can set these keys as you would above in drive-server.
$ RIVE_SERVER_PUB_KEY=<yourPubKey> DRIVE_SERVER_PRIV_KEY=<yourPrivKey> drive qr --address <targetAddress> [files...]