How to zip a folder in node js application & after zip downloading start?
问题 I tried with npm package adm-zip 0.4.4 because the latest one 0.4.7 doesn't work, adm-zip 0.4.4 works on Windows but not on Mac & Linux. Another problem is that I only want zip_folder to be zipped but it zipps the whole directory structure staring from folder_1 . This is the code: var zip = new admZip(); zip.addLocalFolder("./folder_1/folder_2/folder_3/**zip_folder**"); zip.writeZip("./folder_1/folder_2/folder_3/download_folder/zip_folder.zip"); All this happens on the server side. I have