nodejs_logo

Node.JS: Using spawn to import a database

Example 1: background process: File api.js Example link: http://tutorialspots.com/api/import?u=admin_tutorialspots&p=tutorialspots&db=admin_tutorialspots&file=/root/tutorialspots.sql Example 2: event when import done File api.js: Example link: http://tutorialspots.com/api/importdone?u=admin_tutorialspots&p=tutorialspots&db=admin_tutorialspots&file=/root/tutorialspots.sql
JSconf_logo

Javascript: How to read file with FileReader

We can use method readAsBinaryString or readAsText to read file. Example 1: readAsBinaryString Online demo: http://demo.tutorialspots.com/FileReader/readAsBinaryString.html Example 2: readAsText Demo online: http://demo.tutorialspots.com/FileReader/readAsText.html