Created
May 1, 2021 14:59
-
-
Save Tharlys10/438f00f4b2c3a75508b7e4f94d3ab85a to your computer and use it in GitHub Desktop.
Como inicia um projeto node com o typescript
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
# Iniciando o projeto; | |
yarn init -y | |
# Instalando as primeiras dependencias; | |
yarn add express | |
yarn add @types/express ts-node-dev typescript tsconfig-paths -D | |
# Iniciadno projeto com typescript (Criação do arquivo tsconfig.json); | |
yarn tsc --init | |
# Dentro do tsconfig.json descomente o seguinte argumento (outDir); | |
"outDir": "./dist" | |
### CONFIGURANDO PROJETO ### | |
# Config start dev | |
"dev": "ts-node-dev -r tsconfig-paths/register --inspect --transpile-only --ignore-watch node_modules --respawn src/server.ts" | |
# Config eslint e prettier (Para melhor descrição acesse o link); | |
https://www.notion.so/ESLint-e-Prettier-Trilha-Node-js-d3f3ef576e7f45dfbbde5c25fa662779#eaf6e8bdcabc4d809cdae302e29750da |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment