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'); | |
function listarArquivosEPastasDeUmDiretorio(diretorio, arquivos) { | |
if(!arquivos) | |
arquivos = []; | |
let listaDeArquivos = fs.readdirSync(diretorio); | |
for(let k in listaDeArquivos) { | |
let stat = fs.statSync(diretorio + '/' + listaDeArquivos[k]); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/select2.min.css" rel="stylesheet" /> | |
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/select2.min.js"></script> | |
</head> |
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').promises; | |
async function listarArquivosDoDiretorio(diretorio, arquivos) { | |
if(!arquivos) | |
arquivos = []; | |
let listaDeArquivos = await fs.readdir(diretorio); | |
for(let k in listaDeArquivos) { | |
let stat = await fs.stat(diretorio + '/' + listaDeArquivos[k]); |
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'); | |
const ini = require('ini'); | |
const animaisConfig = ini.parse(fs.readFileSync('./animais.ini', 'utf-8')); | |
const nomeAnimais = animaisConfig.animais.nomes; | |
console.log(nomeAnimais); |
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
config.desenvolvimento.ip = '127.0.0.1'; | |
config.producao.porta = '3308'; | |
config.producao.novaChave = 'Esta é uma nova chave!' | |
fs.writeFileSync('./config_modified.ini', ini.stringify(config)) |
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 producaoIp = config.producao.ip; | |
console.log("IP do servidor em produção: " + producaoIp); |
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'); | |
const ini = require('ini'); | |
const config = ini.parse(fs.readFileSync('./config.ini', 'utf-8')); | |
console.log(config.desenvolvimento); |
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'); | |
const ini = require('ini'); | |
const config = ini.parse(fs.readFileSync('./config.ini', 'utf-8')); | |
const website = config.website; | |
console.log(website); |
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
<style> | |
.icone{ | |
font-size:500px; | |
color:red; | |
margin-left:30px; | |
} | |
</style> | |
<i class="fa fa-bus icone"></i> |
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
<i class="fa fa-bus"></i> |