Neurophysiologically Pseudoscientific Manatee
    Wondering what’s next for npm?Check out our public roadmap! »

    sftpcopy

    1.0.0 • Public • Published

    实现sftp的文件夹上传服务器

    使用

     
    const {resolve}=require("path")
    const localDir=resolve(__dirname,"../dist")
    const sftpcopy=require("sftpcopy");
    const config ={
        host: '127.178.2.2',
        port: '22',
        username: 'root',
        password: '123456',
        copys:[
            //文件夹上传服务器
            {
                type:"dir",
                from:resolve(localDir,"includes"), //本地地址
                to:"/data/app/wct.smart-led.club/public/includes"  //服务器地址
            },
            // 文件上传服务器
            {
                type:"file",
                from:resolve(localDir,"entry.html"),
                to:"/data/app/wct.smart-led.club/public/entry.html"
            }
        ]
    }
    async function run (){
        let res=await sftpcopy(config)
        console.log(res)
    }
     
    run()
     
     
     

    Install

    npm i sftpcopy

    DownloadsWeekly Downloads

    4

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    3.25 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar