Skip to content

Instantly share code, notes, and snippets.

@nicolas-lizarazo
Forked from Klerith/configurar-node-ts.md
Created February 5, 2026 01:48
Show Gist options
  • Select an option

  • Save nicolas-lizarazo/1c3c851135e78480369d9ce8879576d3 to your computer and use it in GitHub Desktop.

Select an option

Save nicolas-lizarazo/1c3c851135e78480369d9ce8879576d3 to your computer and use it in GitHub Desktop.
Node con TypeScript - TS-Node-dev simplificado

Node con TypeScript - TS-Node-dev (preferido)

  1. Instalar TypeScript y demás dependencias
npm i -D typescript @types/node ts-node-dev rimraf
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
npx tsc --init --outDir dist/ --rootDir src
  1. Crear scripts para dev, build y start (Más sobre TS-Node-dev aquí)
  "dev": "tsnd --respawn --clear src/app.ts",
  "build": "rimraf ./dist && tsc",
  "start": "npm run build && node dist/app.js"
@nicolas-lizarazo
Copy link
Author

nicolas-lizarazo commented Feb 7, 2026

  1. Para usar node como Fernando sin problemas con versiones posteriores en tsconfig.json al final dentro de compilerOptions
"verbatimModuleSyntax": false,
"module": "CommonJS",
"esModuleInterop": true 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment