This file contains 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
module.exports = { | |
env: { | |
browser: true, | |
es2021: true, | |
node: true, | |
jest: true, | |
}, | |
extends: [ | |
'eslint:recommended', | |
'plugin:@typescript-eslint/recommended', |
This file contains 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
module.exports = { | |
semi: true, | |
trailingComma: 'all', | |
singleQuote: true, | |
printWidth: 80, | |
tabWidth: 2, | |
endOfLine: 'auto', | |
} |
This file contains 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
import winston, { format } from 'winston'; | |
const logger = winston.createLogger({ | |
level: process.env.LOG_LEVEL || 'silly', | |
exitOnError: false, | |
}); | |
const formatLogProduction = format.combine( | |
format.metadata({ fillExcept: ['message', 'level', 'timestamp', 'label'] }), | |
format.timestamp(), |
This file contains 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
{ | |
/* you can try: node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest | |
* you can use with --watch option of jest, works nice | |
*/ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Debug Jest Tests with Typescript", | |
"type": "node", | |
"request": "launch", |
This file contains 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
# EditorConfig is awesome: https://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 |
This file contains 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
let secondFactor = 2; | |
// 😈 - Função Impura | |
function multiply(firstFactor) { | |
return firstFactor * secondFactor; | |
} | |
console.log(multiply(2)); // output: 4 | |
secondFactor = 4; | |
console.log(multiply(2)); // output: 8 |
This file contains 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
let person = null; | |
person = 'João' | |
const greeting = 'Olá'; | |
// 😈 - Função Impura | |
function getGreetingsToPerson() { | |
return `${greeting} ${person}`; | |
} |
This file contains 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
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
# Runtime data | |
pids | |
*.pid |
This file contains 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
#SERVER CONFIG | |
SERVER_PORT='3333' | |
#STORAGE | |
AZURE_STORAGE_CONNECTION_STRING='' | |
AZURE_STORAGE_ACCESS_KEY='' | |
AZURE_STORAGE_ACCOUNT='' | |
AZURE_STORAGE_CONTAINER_NAME='' | |
#BANCO DE DADOS |
This file contains 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
# Create and use original "".env" | |
#SERVER CONFIG | |
SERVER_PORT='' | |
APP_NAME='' | |
CPUS=4 | |
#STORAGE |