Created
November 15, 2017 19:08
-
-
Save isrmicha/7e48849d71e8e367f5f6ef646a6c4f4e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
console.log("Qual arquivo com as querys ?"); | |
var prompt = require('prompt'); | |
prompt.start(); | |
prompt.get([{ | |
name: 'nomeArquivo', | |
description: 'Nome do arquivo ? Ex: querys.txt ', | |
type: 'string', | |
required: true | |
}], function(err, results) { | |
var arquivoLido = fs.readFileSync(results.nomeArquivo); | |
console.log(arquivoLido.toString()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment