3. 3rd GreeceJS Meetup
WHAT IS NODE.JS?
Evented I/O for v8 javascript
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses
an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time
applications that run across distributed devices.
Kostas Karolemeas
4. 3rd GreeceJS Meetup
WHY NODE.JS?
•
Performance and Scalability
•
•
BUT: you need to respect the asynchronous model otherwise node cannot fix late
responses…
End-to-end javascript / reusable code / no need to switch contexts
•
BUT: a good web developer is not by default a good server-side developer
•
AND: you will not be able to write in the same way both sides (e.g. different
frameworks)
•
Strong, responsive and enthusiastic community
•
Many hosting options (IaaS to PaaS)
•
Mature development tools
Kostas Karolemeas
5. 3rd GreeceJS Meetup
NODE.JS SERVICES
URI routing
URI routing
(e.g. REST API)
(e.g. REST API)
Jade
Jade
Ham
Ham
ll
Views (templates)
Views (templates)
Express
Express
(web dev.
(web dev.
framework)
framework)
Sessions
Sessions
EJS
EJS
Error Handling
Error Handling
Configuration
Configuration
Logging
Logging
Cookies
Cookies
Connect
Connect
(middleware)
(middleware)
Auth
Auth
Session
Session
Stores
Stores
Kostas Karolemeas
7. 3rd GreeceJS Meetup
DEPLOYING NODE.JS
FREE
Blitz
Blitz
Release
Release
Management
Management
Dynos
Dynos
Logging
Logging
Redis To Go
Redis To Go
Kostas Karolemeas
8. 3rd GreeceJS Meetup
NODE.JS TOOLS
•
npm - package/dependency manager
•
Mocha - test framework
•
•
Alternative Reporters for results
•
•
Alternative DSL (interfaces) for describing tests
Runs either from a shell or in a browser
WebStorm - Javascript IDE
•
Integrated Node.js launcher / debugger
•
Excellent javascript editor
•
Very good integration with task management and version control tools
Kostas Karolemeas
9. 3rd GreeceJS Meetup
WHAT’S NEXT?
•
Give it a spin!
•
Install Node.JS and NPM
•
Install WebStorm
•
Install Git
•
Create an account in Heroku and install tools
•
Follow Heroku instructions to create a Node.js application
•
•
Use heroku-buildpack-nodejs to install latest Node.js
Install Heroku add-ons: MongoLab, Redis To Go, Logging, Release
Management
Kostas Karolemeas