Lesson 3 of the Node.js Workshop by Rafał Pocztarski at inFullMobile.
- Prev: https://github.com/rsp/nw2
- Next: (not yet)
inFullMobile is a digital product design and development studio based in Warsaw, Poland.
Doing mobile, web, IoT and hardware projects from the idea to a final product.
Rafał Pocztarski is a Senior Node.js Developer and Team Leader at inFullMobile.
Programming since 1986, commercially since 1996.
Programming in Node since watching the first Node.js presentation by Ryan Dahl in 2009.
Enjoys writing about Node.js on Stack Overflow, holding a rare Gold Node.js Badge.
See the documentation added after the last workshop:
The official certification program under development:
More info on:
Public info about the program scope, recommended books, etc.:
As a Node.js Foundation Certification Committee Member I cannot say anything more than what is available publically under the links above so please stop asking.
Proposals:
Current Node API docs:
HTTP/2 in the core since July, 2017
Say hello to HTTP/2 for Node.js Core
Destructuring example:
(({ a: x, b: { c: [y, z] } }) => ({ x, y, z }))({ a: 1, b: { c: [2, 3] } });
d1.js:
const f = ({
a: x,
b: {
c: [y, z]
}
}) => ({ x, y, z });
const r = f({ a: 1, b: { c: [2, 3] } });
console.log(r);
Install:
$ npm install -g babel-cli
Use:
$ babel file.js
Explain:
- https://babeljs.io/env/
- https://www.npmjs.com/package/babel-preset-env
- https://www.npmjs.com/package/babel-preset-es2015
Explain how to install.
$ npm install -g typescript
d2.ts:
const f = ({
a: x,
b: {
c: [y, z]
}
}: {
a: string,
b: {
c: number[]
}
}) => ({ x, y, z });
const r = f({ a: '1', b: { c: [2, 3] } });
console.log(r);
Compile:
$ tsc file
Run:
$ node file
Popular modules:
- https://www.npmjs.com/package/tap
- https://www.npmjs.com/package/tape
- https://www.npmjs.com/package/jasmine
- https://www.npmjs.com/package/mocha
- https://www.npmjs.com/package/chai
More: