Design Mistakes in Node
1. Not sticking with Promises.
2. Security
3. The Build System (GYP)
4. package.json
5. node_modules
6. require("module") without the extension ".js"
7. index.js
8
Slide 9
Slide 9 text
1. Not sticking with Promises
2009
年6
月にPromise
を入れたが、2010
年2
月には削除し
た。それは間違いだった。
callback
の方がパフォーマンスが優れていた
async/await
の抽象化のためにPromise
は必要だった
9
Slide 10
Slide 10 text
1. Not sticking with Promises
http://b.hatena.ne.jp/entry/365474721/comment/jovi0608
10
許可しなかった場合はパーミッションエラー
Deno requests network access to "listen". Grant? [yN]N
PermissionDenied: permission denied
at DenoError (deno/js/errors.ts:19:5)
at maybeError (deno/js/errors.ts:38:12)
at maybeThrowError (deno/js/errors.ts:26:15)
at sendSync (deno/js/dispatch.ts:67:5)
at listen (deno/js/net.ts:145:19)
at serve (file:///Users/admin/.deno/deps/https/deno.land/x/http/http.ts:53:20)
at main (file:///Users/admin/hello_http.ts:6:23)
at eval (file:///Users/admin/hello_http.ts:11:1)
at _drainRunQueue (deno/js/compiler.ts:209:38)
at run (deno/js/compiler.ts:587:10)
33