simple-ftpd
这个是有命令行的。说明如下:

When installed globally, ftpd will provide a small cli, which will quickly create a fs-based ftp server.

You can use it like this:

ftp-server /public/files --host 192.168.0.1 --port 1234 --max-connections 10
  • --host will default to 127.0.0.1
  • --port will default to 1337
  • --max-connections will default to 10
  • --read-only will default to true
    Unless specified, the ftp root will default to process.cwd()
    The cli will accept any login, so be careful when setting --read-only to false.

实际在win10上测试发现有问题不能使用:

λ ftp-server C:\                                                                                                
internal/modules/cjs/loader.js:582                                                                              
    throw err;                                                                                                  
    ^                                                                                                           

Error: Cannot find module 'chalk'                                                                               
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)                                 
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)                                            
    at Module.require (internal/modules/cjs/loader.js:636:17)                                                   
    at require (internal/modules/cjs/helpers.js:20:18)                                                          
    at Object.<anonymous> (C:\Users\k\AppData\Roaming\npm\node_modules\simple-ftpd\lib\session.js:8:15)         
    at Module._compile (internal/modules/cjs/loader.js:688:30)                                                  
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)                                    
    at Module.load (internal/modules/cjs/loader.js:598:32)                                                      
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)                                                    
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)                                             

另外关注下: ftp-srv

标签: none 阅读量: 1390

添加新评论