댓글 검색 목록

[Nodejs] basic-ftp

페이지 정보

작성자 운영자 작성일 20-03-18 14:53 조회 990 댓글 0

Node.js 용 FTP 클라이언트입니다. 

TLS를 통한 명시 적 FTPS, IPv6을 통한 수동 모드, Promise 기반 API가 있으며 전체 디렉토리에서 작동하는 방법을 제공합니다.


https://github.com/patrickjuchli/basic-ftp 


const ftp = require("basic-ftp")

example()

async function example() {
    const client = new ftp.Client()
    client.ftp.verbose = true
    try {
        await client.access({
            host: "myftpserver.com",
            user: "very",
            password: "password",
            secure: true
        })
        console.log(await client.list())
        await client.uploadFrom("README.md", "README_FTP.md")
        await client.downloadTo("README_COPY.md", "README_FTP.md")
    }
    catch(err) {
        console.log(err)
    }
    client.close()
}




댓글목록 0

등록된 댓글이 없습니다.

웹학교 로고

온라인 코딩학교

코리아뉴스 2001 - , All right reserved.