An open API service indexing awesome lists of open source software.

https://github.com/artskydj/ftp-basic-user-pass

Extension for the ftp-core, handling USER and PASS commands, reading from a JSON file.
https://github.com/artskydj/ftp-basic-user-pass

Last synced: 8 months ago
JSON representation

Extension for the ftp-core, handling USER and PASS commands, reading from a JSON file.

Awesome Lists containing this project

README

          

ftp-basic-user-pass
===================

Builds on top of the [ftp-core](https://github.com/sdmp/ftp-core).

#install

```
npm install ftp-basic-user-pass
```

#examples

###hard coded object

server.js

```js
var Ftp = require('ftp-core')
var FtpUserPass = require('ftp-basic-user-pass')
var Socket = require('ftp-normal-sockets')

var myFtp = new Ftp()
.extend(FtpUserPass({
joseph: '12345',
friends: 'lol insecure'
}))
.extend(Socket({ listen: 21 }))
```

###from JSON file

auth.json
```json
{
"joseph": "12345",
"friends": "lol insecure"
}
```

server.js
```js
var Ftp = require('ftp-core')
var FtpUserPass = require('ftp-basic-user-pass')
var Socket = require('ftp-normal-sockets')
var userPassMap = require('./auth.json')

var myFtp = new Ftp()
.extend(FtpUserPass(userPassMap))
.extend(Socket({ listen: 21 }))
```

#todo

- [ ] add tests
- [ ] in the docs, talk a bit about how ftp-core extensions work

#license

[VOL](http://veryopenlicense.com)