ig-xml-sender

0.0.3 • Public • Published

IG XML Sender - Node Module

This module evaluate a XML file, zip and sent to a FTP account

How to use

var igXMLSender = require("ig-xml-sender");


fs.readFile('example.xml', "utf8", (err, fd) => {
	if (err) {
		if (err.code === 'ENOENT') {
			console.error('File does not exist');
			return;
		}

		throw err;
	}
	
	// Process XML
	igXMLSender.processXML(fd, // File
		"public/test1.zip", // Destination on FTP 
		"file.xml", // Internal zipped file name
			{	// FTP credentials
				host: "localhost",
		 		port:21, 
		 		user:"username",
		 	 	pass:"password"
		 	}, 
		 	function(result){
				console.info("Success:", result);// If success, result is true
	});
});


/ig-xml-sender/

    Package Sidebar

    Install

    npm i ig-xml-sender

    Weekly Downloads

    3

    Version

    0.0.3

    License

    ISC

    Unpacked Size

    3.99 kB

    Total Files

    9

    Last publish

    Collaborators

    • luizcoder