Skip to content

Commit

Permalink
Store logins on enviroment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jcherqui committed Feb 28, 2017
1 parent f560f17 commit c590599
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ Download DDL links, magnets and torrent files.

`npm i -g rdcli`

And set your real-debrid account as enviroment variable on your `~/.bashrc`

```bash
export REALDEBRID_USERNAME=your_username
export REALDEBRID_PASSWORD=your_password
```

## Usage

`rdcli <url|magnet|torrent>`
Expand Down
4 changes: 2 additions & 2 deletions src/rdcli.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ program
.usage('<url|magnet|torrent>')
.action(arg => co(function* action() {
try {
const username = yield prompt('Username: ');
const password = yield prompt.password('Password: ');
const username = process.env.REALDEBRID_USERNAME || (yield prompt('Username: '));
const password = process.env.REALDEBRID_PASSWORD || (yield prompt.password('Password: '));
const token = yield getToken(username, password);

let link;
Expand Down

0 comments on commit c590599

Please sign in to comment.