Skip to content

Commit 458e01d

Browse files
authored
Update nodejs.md
1 parent 38c52cf commit 458e01d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/quick/nodejs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ TypeScript has had *first class* support for Node.js since inception. Here's how
88
1. Add `node.d.ts` (`npm install @types/node --save-dev`)
99
1. Init a `tsconfig.json` for TypeScript options with a few key options in your tsconfig.json (`npx tsc --init --esModuleInterop --resolveJsonModule --lib es6,dom --module commonjs`)
1010

11-
That's it! Fire up your IDE (e.g. `alm -o`) and play around. Now you can use all the built in node modules (e.g. `import fs = require('fs');`) with all the safety and developer ergonomics of TypeScript!
11+
That's it! Fire up your IDE (e.g. `code .`) and play around. Now you can use all the built in node modules (e.g. `import * as fs from 'fs';`) with all the safety and developer ergonomics of TypeScript!
1212

1313
## Bonus: Live compile + run
1414
* Add `ts-node` which we will use for live compile + run in node (`npm install ts-node --save-dev`)
@@ -19,7 +19,7 @@ Now just add a `script` target to your `package.json` based on your application
1919
```json
2020
"scripts": {
2121
"start": "npm run build:live",
22-
"build:live": "nodemon --exec ./node_modules/.bin/ts-node -- ./index.ts"
22+
"build:live": "nodemon --watch 'src/**/*.ts' --exec 'ts-node' src/index.ts"
2323
},
2424
```
2525

0 commit comments

Comments
 (0)