Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rafaelquines/9f1b642a6adad6dd8cb5b0acfb47c1dc to your computer and use it in GitHub Desktop.
Save rafaelquines/9f1b642a6adad6dd8cb5b0acfb47c1dc to your computer and use it in GitHub Desktop.
New Node TS Project
mkdir app-node #app_name
cd app-node #app_name
npm init -y
npm i --save-dev ts-node
npm i --save-dev @types/node
npm i --save typescript
tsc --init
echo "require('ts-node/register');" >> index.js
echo "require('./src/main');" >> index.js
mkdir src
echo "console.log('OK');" >> src/main.ts
node index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment