node at apiary.io

22
apiary.io & NODE.JS Jakub Nešetřil

Upload: jakub-nesetril

Post on 17-May-2015

3.867 views

Category:

Technology


1 download

DESCRIPTION

Node.js usage at Apiary.io - slides from JS meetup in Node5 in Prague.

TRANSCRIPT

Page 1: Node at Apiary.io

apiary.io

&NODE.JS

Jakub Nešetřil

Page 2: Node at Apiary.io

apiary.iohttp://www.flickr.com/photos/pagedooley/4310765089/

REST

Page 3: Node at Apiary.io

apiary.iohttp://www.flickr.com/photos/emrank/4088047582/

API

Page 4: Node at Apiary.io

apiary.io

REST API

Page 5: Node at Apiary.io

apiary.io

REST API Documentation

Page 6: Node at Apiary.io

apiary.io

Page 7: Node at Apiary.io

apiary.io

Page 8: Node at Apiary.io
Page 9: Node at Apiary.io

apiary.io

Page 10: Node at Apiary.io

apiary.io

hledáme k sobě další …

Page 11: Node at Apiary.io

apiary.io

BEHIND THE SCENES

•MVC web app

• API Blueprint (Markdown++)

• HTTP Proxy

• HTTP Diffs

• JSON Schema

• wildcard DNS

Page 12: Node at Apiary.io

apiary.io

STACK OVERVIEW

• Express, Eco, Stylus

•MongoDB + Mongoose, Redis + HiRedis, Socket.IO

• Ace, Markdown, Amanda, Node-Http-Proxy

•Mocha, Chai, Zombie

Page 13: Node at Apiary.io

apiary.io

async

coffee-script

hiredis

http-proxy

mongoose

socket.iostylus

Page 14: Node at Apiary.io

apiary.io

amanda

async

chai

coffee-script

connect

connect-mongodb

ecoexpress

googlediff

gzippo

hiredis

http-proxymailchimp

moment

mongoose

mongoose-dbref

nib

nodemailer

oauth

ravenredis

request

robotskirt

send

socket.iostylus

step

Page 15: Node at Apiary.io

apiary.io

amanda

async

chai

coffee-script

connect

connect-mongodb

ecoexpress

googlediff

gzippo

hiredis

http-proxymailchimp

moment

mongoose

mongoose-dbref

nib

nodemailer

oauth

ravenredis

request

robotskirt

send

socket.iostylus

step

docco

mocha

node-inspector

sinonsinon-mochasupervisor

tempzombie

Page 16: Node at Apiary.io

apiary.io

amanda

async

chai

coffee-script

connect

connect-mongodb

ecoexpress

googlediff

gzippo

hiredis

http-proxymailchimp

moment

mongoose

mongoose-dbref

nib

nodemailer

oauth

ravenredis

request

robotskirt

send

socket.iostylus

step

docco

mocha

node-inspector

sinonsinon-mochasupervisor

tempzombie

Page 18: Node at Apiary.io

apiary.io

THE GOOD

• low level access - to http, to tcp, to the socket

• whole app ~6k SLOC, ~10k SLOC including tests

Page 20: Node at Apiary.io

apiary.io

THE BAD

• debugging async errors / race conditions

• long stack traces

• wrong return value vs. no callback

Page 22: Node at Apiary.io

apiary.io

QUESTIONS?

E-MAIL [email protected] TWITTER @jakubnesetril