How to contribute to

- Trivikram Kamat

#SeattleJS

Trivikram Kamat

Software Development Engineer

@trivikram

@trivikr

Tree

Weak

Rum

+

+

Tri

vik

ram

.

.

What's your name again?

My history with NodeJS

  • Have been using NodeJS for 3 years

  • Started contributing to NodeJS core in Oct 2017

    • providing HTTP/2 support

  • Became NodeJS core collaborator in March 2018

What are we going to cover?

  • Quick intro to NodeJS

  • We'll write a simple NodeJS server

  • We'll understand the code flow through node internals

  • Write a unit test for NodeJS core and create a Pull Request

JavaScript

Code

Machine

Code

Chrome's V8 engine

JavaScript

Code

Machine

Code

Your C++ Program

What JavaScript had to do to manage a server?

  • Better ways to organize our code into reusable pieces
  • Ways to deal with files and databases
  • Ability to communicate over the internet
  • Ability to accept standard request and send responses

Let's write our first NodeJS Server

Prerequisites

Install NodeJS using nvm curl command

Your first NodeJS server

const http = require("http");

http.createServer((req, res) => {

    res.end("Hello World!\n");

}).listen(3000);

What did we learn?

  • Quick intro to NodeJS

  • We wrote a simple NodeJS server

  • We understood the code flow through node internals

  • We wrote a unit test for NodeJS core and created a Pull Request

What can I do next?

  • Try vscode if you haven't already

  • Write more code in NodeJS and use debugger to do a deep dive into NodeJS internals

  • Find out in NodeJS coverage if your favorite module needs more unit tests

  • Add those unit tests and create a Pull Request!

Thank you for listening!

Trivikram Kamat

Twitter: @trivikram

Github: @trivikr

Slides: https://slides.com/trivikram/how-to-contribute-to-node

How to contribute to NodeJS

By Trivikram Kamat

How to contribute to NodeJS

Slides for SeattleJS talk on how to contribute to NodeJS

  • 998