SlideShare a Scribd company logo
1 of 31
Download to read offline
Node.js et
NPM
De la gestion de
dépendances à la
publication de packages
NodeJS
- Environnement d'exécution asynchrone
- Basé sur V8
- Permet d'utiliser Javascript côté serveur
- Mais surtout ...
Une communauté très active ! 
NPM
- Gestionnaire de paquets
(Equivalent de pip en python ou gem en Ruby)
- Registry (annuaire, moteur de recherche)
- Basé sur un manifeste (package.json)
{
"name": "americano",
"version": "0.1.0",
"description": "Express simplifié !",
"author": "Frank Rousseau <frank@cozycloud.cc>",
"dependencies": {
"colors": "0.x.x",
"express": "3.3.x",
"commander": "2.3.1",
"printit": "0.2.x"
},
"devDependencies": {
"mocha": "0.5.x"
},
"engine": "node >= 0.4.1"
}
Dépendances
{
"name": "americano",
"version": "0.1.0",
"description": "Express simplifié !",
"author": "Frank Rousseau <frank@cozycloud.cc>",
"dependencies": {
"colors": "0.x.x",
"express": "3.3.x",
"commander": "2.3.1",
"printit": "0.2.x"
},,
"devDependencies": {
"mocha": "0.5.x"
},
"engine": "node >= 0.4.1"
}
{
"name": "americano",
"version": "0.1.0",
"description": "Express simplifié !",
"author": "Frank Rousseau <frank@cozycloud.cc>",
"dependencies": {
"colors": "0.x.x",
"express": "3.3.x",
"commander": "2.3.1",
"printit": "0.2.x"
},
"devDependencies": {
"mocha": "0.5.x"
},
"engine": "node >= 0.4.1"
}
npm install [--production]
npm install --save colors
npm install -g express
Récupération
# affiche l'arbre des
# dépendances
npm ls
# affiche les dépendances
# obsolètes
npm outdated
# Génère les dépendances
# manquantes
pakmanager deps
packages NPM utiles
Très populaires
- ExpressJS/Sails/Americano (framework web)
- Request/Request-json (requêtage simplifié)
- Underscore/Lodash (utilitaires tableaux)
- Commander/Optimist/Nopt (parsers d'arguments)
- Jade (moteur de template)
- Moment (date)
- Stylus (pré-processeur CSS)
Populaires
- Cheerio (scraping)
- Through (gestion de flux)
- Glob (recherche de fichiers)
- Rimraf/fs-extra (rm -rf, add-on file-system) 
- Shelljs (Bash dans node)
- Chalk (coloration sortie console)
Build
bin/americano
tests/tests.coffee
Cakefile
README
main.coffee
package.json
bin/americano
tests/tests.coffee
Cakefile
README
main.coffee
main.js
package.json
Objectif
compilation des sources
+ raccourci pour les tests
+ identification du binaire
{
"name": "americano",
"version": "0.1.0",
"description": "Express simplifié !",
"author": "Frank Rousseau <frank@cozycloud.cc>",
"dependencies": {
"colors": "0.x.x",
"express": "3.3.x",
"commander": "2.3.1",
"printit": "0.2.x"
},
"devDependencies": {
"mocha": "0.5.x"
},
"engine": "node >= 0.4.1",
"main": "./main.js",
"scripts": {
"prepublish": "cake build",
"test": "cake tests"
},
"bin": {
"americano": "./bin/americano"
}
}
{
"name": "americano",
"version": "0.1.0",
"description": "Express simplifié !",
"author": "Frank Rousseau <frank@cozycloud.cc>",
"dependencies": {
"colors": "0.x.x",
"express": "3.3.x",
"commander": "2.3.1",
"printit": "0.2.x"
},
"devDependencies": {
"mocha": "0.5.x"
},
"engine": "node >= 0.4.1",
"main": "./main.js",
"scripts": {
"prepublish": "cake build",
"test": "cake tests" <= $ npm test
},
"bin": {
"americano": "./bin/americano"
}
}
{
"name": "americano",
"version": "0.1.0",
"description": "Express simplifié !",
"author": "Frank Rousseau <frank@cozycloud.cc>",
"dependencies": {
"colors": "0.x.x",
"express": "3.3.x",
"commander": "2.3.1",
"printit": "0.2.x"
},
"devDependencies": {
"mocha": "0.5.x"
},
"engine": "node >= 0.4.1",
"main": "./main.js",
"scripts": {
"prepublish": "cake build",
"test": "cake tests"
},
"bin": {
"americano": "./bin/americano"
}
}
Outils de build
- Grunt
- Cake
- Gulp
- Broccoli
Grunt - Gruntfile
$ npm install -g grunt-cli
$ npm install –-save-dev grunt@0.4.4
$ npm install –-save-dev grunt-contrib-coffee@0.10.0
$ grunt
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
coffee: {
compile: {
files: {
'./main.js': './main.coffee' }}}});
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.registerTask('default', ['coffee']);
};
Cake - Cakefile
$ npm install -g coffee-script
$ cake build
task "build", "Compile coffee files to JS", ->
console.log "Compile main file..."
command = "coffee -c main.coffee"
exec command, (err, stdout, stderr) ->
if err
console.log "Error: n #{err}"
process.exit 1
else
console.log "Compilation succeeded."
Gulp - Gulpfile.js
$ npm install -g grunt-cli
$ npm install –-save-dev gulp@3.6.2
$ npm install –-save-dev gulp-coffee@1.4.3
$ gulp
var gulp = require('gulp');
var coffee = require('gulp-coffee');
gulp.task('scripts', function() {
return gulp.src(['./main.coffee'])
.pipe(coffee())
.pipe(gulp.dest('./'));
});
gulp.task('default', ['scripts']);
Broccoli – Brocfile.js
$ npm install -g broccoli
$ npm install –-save-dev broccoli@0.12.0
$ npm install –-save-dev broccoli-coffee@0.1.0
$ brocoli build ./build
var filterCoffeeScript = require('broccoli-coffee');
module.exports = filterCoffeeScript('src', {});
Publication
npm set init.author.name "Votre nom"
npm set init.author.email "vous@exemple.fr"
npm set init.author.url "http://votresite.fr"
npm adduser
Enregistrement
npm version [patch|minor|major]
Up de version
npm publish
Apprenez Node.js avec Cozy ! 
http://cozy.io/hack/getting-started/
@mycozycloud
cozy.io

More Related Content

What's hot

Getting Started with MongoDB and Node.js
Getting Started with MongoDB and Node.jsGetting Started with MongoDB and Node.js
Getting Started with MongoDB and Node.jsGrant Goodale
 
Introduction to REST API with Node.js
Introduction to REST API with Node.jsIntroduction to REST API with Node.js
Introduction to REST API with Node.jsYoann Gotthilf
 
Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node jsfakedarren
 
Google chrome presentation
Google chrome presentationGoogle chrome presentation
Google chrome presentationreza jalaluddin
 
3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don'tF5 Buddy
 
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015Jeongkyu Shin
 
CoffeeScript - An Introduction
CoffeeScript - An IntroductionCoffeeScript - An Introduction
CoffeeScript - An IntroductionManvendra Singh
 
Nodejs quick start
Nodejs quick startNodejs quick start
Nodejs quick startGuangyao Cao
 
Quick Introduction to Node.js
Quick Introduction to Node.jsQuick Introduction to Node.js
Quick Introduction to Node.jsNaing Lin Aung
 
A slightly advanced introduction to node.js
A slightly advanced introduction to node.jsA slightly advanced introduction to node.js
A slightly advanced introduction to node.jsSudar Muthu
 
Let s Enjoy Node.js
Let s Enjoy Node.jsLet s Enjoy Node.js
Let s Enjoy Node.jsFred Chien
 
from(0).to('rubygems.org')
from(0).to('rubygems.org')from(0).to('rubygems.org')
from(0).to('rubygems.org')michele franzin
 
System webpack-jspm
System webpack-jspmSystem webpack-jspm
System webpack-jspmJesse Warden
 

What's hot (20)

The jsdom
The jsdomThe jsdom
The jsdom
 
Getting Started with MongoDB and Node.js
Getting Started with MongoDB and Node.jsGetting Started with MongoDB and Node.js
Getting Started with MongoDB and Node.js
 
Introduction to REST API with Node.js
Introduction to REST API with Node.jsIntroduction to REST API with Node.js
Introduction to REST API with Node.js
 
Building a real life application in node js
Building a real life application in node jsBuilding a real life application in node js
Building a real life application in node js
 
JavaScript on the Desktop
JavaScript on the DesktopJavaScript on the Desktop
JavaScript on the Desktop
 
Google chrome presentation
Google chrome presentationGoogle chrome presentation
Google chrome presentation
 
3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't
 
(C)NodeJS
(C)NodeJS(C)NodeJS
(C)NodeJS
 
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
연구자 및 교육자를 위한 계산 및 분석 플랫폼 설계 - PyCon KR 2015
 
CoffeeScript - An Introduction
CoffeeScript - An IntroductionCoffeeScript - An Introduction
CoffeeScript - An Introduction
 
Vidoop CouchDB Talk
Vidoop CouchDB TalkVidoop CouchDB Talk
Vidoop CouchDB Talk
 
Nodejs quick start
Nodejs quick startNodejs quick start
Nodejs quick start
 
Quick Introduction to Node.js
Quick Introduction to Node.jsQuick Introduction to Node.js
Quick Introduction to Node.js
 
Scaling WordPress
Scaling WordPressScaling WordPress
Scaling WordPress
 
A slightly advanced introduction to node.js
A slightly advanced introduction to node.jsA slightly advanced introduction to node.js
A slightly advanced introduction to node.js
 
MongoDB at RuPy
MongoDB at RuPyMongoDB at RuPy
MongoDB at RuPy
 
Let s Enjoy Node.js
Let s Enjoy Node.jsLet s Enjoy Node.js
Let s Enjoy Node.js
 
from(0).to('rubygems.org')
from(0).to('rubygems.org')from(0).to('rubygems.org')
from(0).to('rubygems.org')
 
Node js first look - 2016
Node js first look - 2016Node js first look - 2016
Node js first look - 2016
 
System webpack-jspm
System webpack-jspmSystem webpack-jspm
System webpack-jspm
 

Viewers also liked

An Extensible Virtual Digital Libraries Generator @ ECDL 2008
An Extensible Virtual Digital Libraries Generator @ ECDL 2008An Extensible Virtual Digital Libraries Generator @ ECDL 2008
An Extensible Virtual Digital Libraries Generator @ ECDL 2008Leonardo Candela
 
[plan politika] Slide ramadhan politik
[plan politika] Slide ramadhan politik[plan politika] Slide ramadhan politik
[plan politika] Slide ramadhan politikPlan Politika
 
IEC Orientation first year for MBA,MCA,B. Pharmacy & IHM
IEC Orientation first year for MBA,MCA,B. Pharmacy & IHMIEC Orientation first year for MBA,MCA,B. Pharmacy & IHM
IEC Orientation first year for MBA,MCA,B. Pharmacy & IHMiec
 
Guaranteed Successful Projects
Guaranteed Successful ProjectsGuaranteed Successful Projects
Guaranteed Successful Projectsfaruqh
 
Tugas metpen ane nurussyamsiyah (062410045)
Tugas metpen ane nurussyamsiyah (062410045)Tugas metpen ane nurussyamsiyah (062410045)
Tugas metpen ane nurussyamsiyah (062410045)zhukma
 
Nothing But Love - My speech to my sister on her wedding day - Journey within...
Nothing But Love - My speech to my sister on her wedding day - Journey within...Nothing But Love - My speech to my sister on her wedding day - Journey within...
Nothing But Love - My speech to my sister on her wedding day - Journey within...Bilal Jaffery
 
Current
CurrentCurrent
Currentiec
 
Weekly news 13th sept to 18th sept
Weekly news 13th sept to 18th septWeekly news 13th sept to 18th sept
Weekly news 13th sept to 18th septNitin Kochhar
 
Non Profit Non Slideshow 7 16 10
Non Profit Non Slideshow 7 16 10Non Profit Non Slideshow 7 16 10
Non Profit Non Slideshow 7 16 10JohnFolger
 
Martina Rotini
Martina RotiniMartina Rotini
Martina RotiniLilllly
 
The influence of US presidential elections on exchange rates
The influence of US presidential elections on exchange ratesThe influence of US presidential elections on exchange rates
The influence of US presidential elections on exchange ratesGeorgian Court University
 
[plan politika] Indonesian Youth and Movements : In the Journey of Youthful M...
[plan politika] Indonesian Youth and Movements : In the Journey of Youthful M...[plan politika] Indonesian Youth and Movements : In the Journey of Youthful M...
[plan politika] Indonesian Youth and Movements : In the Journey of Youthful M...Plan Politika
 
[plan politika] Enjoy jakarta
[plan politika] Enjoy jakarta[plan politika] Enjoy jakarta
[plan politika] Enjoy jakartaPlan Politika
 
áLbum de fotografías
áLbum de fotografíasáLbum de fotografías
áLbum de fotografíasosmara64
 
Tidak layak ke syurga mu
Tidak layak ke syurga muTidak layak ke syurga mu
Tidak layak ke syurga musyafiehidayat
 

Viewers also liked (20)

An Extensible Virtual Digital Libraries Generator @ ECDL 2008
An Extensible Virtual Digital Libraries Generator @ ECDL 2008An Extensible Virtual Digital Libraries Generator @ ECDL 2008
An Extensible Virtual Digital Libraries Generator @ ECDL 2008
 
[plan politika] Slide ramadhan politik
[plan politika] Slide ramadhan politik[plan politika] Slide ramadhan politik
[plan politika] Slide ramadhan politik
 
AFFRETEMENT AERIEN SUR MESURE
AFFRETEMENT AERIEN SUR MESURE AFFRETEMENT AERIEN SUR MESURE
AFFRETEMENT AERIEN SUR MESURE
 
IEC Orientation first year for MBA,MCA,B. Pharmacy & IHM
IEC Orientation first year for MBA,MCA,B. Pharmacy & IHMIEC Orientation first year for MBA,MCA,B. Pharmacy & IHM
IEC Orientation first year for MBA,MCA,B. Pharmacy & IHM
 
Guaranteed Successful Projects
Guaranteed Successful ProjectsGuaranteed Successful Projects
Guaranteed Successful Projects
 
Kannanotto: Talouden lyhyen ja pitkän aikavälin muutostarpeita
Kannanotto: Talouden lyhyen ja pitkän aikavälin muutostarpeitaKannanotto: Talouden lyhyen ja pitkän aikavälin muutostarpeita
Kannanotto: Talouden lyhyen ja pitkän aikavälin muutostarpeita
 
Tugas metpen ane nurussyamsiyah (062410045)
Tugas metpen ane nurussyamsiyah (062410045)Tugas metpen ane nurussyamsiyah (062410045)
Tugas metpen ane nurussyamsiyah (062410045)
 
Nothing But Love - My speech to my sister on her wedding day - Journey within...
Nothing But Love - My speech to my sister on her wedding day - Journey within...Nothing But Love - My speech to my sister on her wedding day - Journey within...
Nothing But Love - My speech to my sister on her wedding day - Journey within...
 
Current
CurrentCurrent
Current
 
Weekly news 13th sept to 18th sept
Weekly news 13th sept to 18th septWeekly news 13th sept to 18th sept
Weekly news 13th sept to 18th sept
 
Weekly news 4
Weekly news 4Weekly news 4
Weekly news 4
 
Non Profit Non Slideshow 7 16 10
Non Profit Non Slideshow 7 16 10Non Profit Non Slideshow 7 16 10
Non Profit Non Slideshow 7 16 10
 
Martina Rotini
Martina RotiniMartina Rotini
Martina Rotini
 
The influence of US presidential elections on exchange rates
The influence of US presidential elections on exchange ratesThe influence of US presidential elections on exchange rates
The influence of US presidential elections on exchange rates
 
[plan politika] Indonesian Youth and Movements : In the Journey of Youthful M...
[plan politika] Indonesian Youth and Movements : In the Journey of Youthful M...[plan politika] Indonesian Youth and Movements : In the Journey of Youthful M...
[plan politika] Indonesian Youth and Movements : In the Journey of Youthful M...
 
Kannanotto: Oppisopimuskoulutus tarvitsee oman kehittämisohjelmansa
Kannanotto: Oppisopimuskoulutus tarvitsee oman kehittämisohjelmansaKannanotto: Oppisopimuskoulutus tarvitsee oman kehittämisohjelmansa
Kannanotto: Oppisopimuskoulutus tarvitsee oman kehittämisohjelmansa
 
[plan politika] Enjoy jakarta
[plan politika] Enjoy jakarta[plan politika] Enjoy jakarta
[plan politika] Enjoy jakarta
 
Shibutra ikeike443
Shibutra ikeike443Shibutra ikeike443
Shibutra ikeike443
 
áLbum de fotografías
áLbum de fotografíasáLbum de fotografías
áLbum de fotografías
 
Tidak layak ke syurga mu
Tidak layak ke syurga muTidak layak ke syurga mu
Tidak layak ke syurga mu
 

Similar to Node.js et NPM: de la récupération de dépendances à la publication de paquets

Using npm to Manage Your Projects for Fun and Profit - USEFUL INFO IN NOTES!
Using npm to Manage Your Projects for Fun and Profit - USEFUL INFO IN NOTES!Using npm to Manage Your Projects for Fun and Profit - USEFUL INFO IN NOTES!
Using npm to Manage Your Projects for Fun and Profit - USEFUL INFO IN NOTES!async_io
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.Mike Brevoort
 
Building HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDBBuilding HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDBdonnfelker
 
It's 10pm: Do You Know Where Your Writes Are?
It's 10pm: Do You Know Where Your Writes Are?It's 10pm: Do You Know Where Your Writes Are?
It's 10pm: Do You Know Where Your Writes Are?MongoDB
 
Package.json ( NodeJS )
Package.json ( NodeJS )Package.json ( NodeJS )
Package.json ( NodeJS )Vivek Garg
 
Server Side Apocalypse, JS
Server Side Apocalypse, JSServer Side Apocalypse, JS
Server Side Apocalypse, JSMd. Sohel Rana
 
Using the Azure Container Service in your company
Using the Azure Container Service in your companyUsing the Azure Container Service in your company
Using the Azure Container Service in your companyJan de Vries
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsMichael Lange
 
Node.js :: Introduction — Part 2
Node.js :: Introduction — Part 2Node.js :: Introduction — Part 2
Node.js :: Introduction — Part 2Roman Liutikov
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsasync_io
 
Webpack | Jakub Kulhan - Skrz.cz
Webpack | Jakub Kulhan - Skrz.czWebpack | Jakub Kulhan - Skrz.cz
Webpack | Jakub Kulhan - Skrz.czskrzczdev
 
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016Zabbix
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with KubernetesCarlos Sanchez
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for CassandraEdward Capriolo
 
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"DataStax Academy
 
Immutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsImmutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsManish Pandit
 
Composer
ComposerComposer
Composercmodijk
 

Similar to Node.js et NPM: de la récupération de dépendances à la publication de paquets (20)

Using npm to Manage Your Projects for Fun and Profit - USEFUL INFO IN NOTES!
Using npm to Manage Your Projects for Fun and Profit - USEFUL INFO IN NOTES!Using npm to Manage Your Projects for Fun and Profit - USEFUL INFO IN NOTES!
Using npm to Manage Your Projects for Fun and Profit - USEFUL INFO IN NOTES!
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
 
nodecalgary1
nodecalgary1nodecalgary1
nodecalgary1
 
Building HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDBBuilding HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDB
 
It's 10pm: Do You Know Where Your Writes Are?
It's 10pm: Do You Know Where Your Writes Are?It's 10pm: Do You Know Where Your Writes Are?
It's 10pm: Do You Know Where Your Writes Are?
 
Package.json ( NodeJS )
Package.json ( NodeJS )Package.json ( NodeJS )
Package.json ( NodeJS )
 
Package.json
Package.jsonPackage.json
Package.json
 
Server Side Apocalypse, JS
Server Side Apocalypse, JSServer Side Apocalypse, JS
Server Side Apocalypse, JS
 
Using the Azure Container Service in your company
Using the Azure Container Service in your companyUsing the Azure Container Service in your company
Using the Azure Container Service in your company
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
 
Making your chrome extension
Making your chrome extensionMaking your chrome extension
Making your chrome extension
 
Node.js :: Introduction — Part 2
Node.js :: Introduction — Part 2Node.js :: Introduction — Part 2
Node.js :: Introduction — Part 2
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
 
Webpack | Jakub Kulhan - Skrz.cz
Webpack | Jakub Kulhan - Skrz.czWebpack | Jakub Kulhan - Skrz.cz
Webpack | Jakub Kulhan - Skrz.cz
 
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
 
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
 
Immutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsImmutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and Jenkins
 
Composer
ComposerComposer
Composer
 

More from Frank Rousseau

Synchronisation de périphériques avec Javascript et PouchDB
Synchronisation de périphériques avec Javascript et PouchDBSynchronisation de périphériques avec Javascript et PouchDB
Synchronisation de périphériques avec Javascript et PouchDBFrank Rousseau
 
Device Synchronization with Javascript and PouchDB
Device Synchronization with Javascript and PouchDBDevice Synchronization with Javascript and PouchDB
Device Synchronization with Javascript and PouchDBFrank Rousseau
 
Newebe, un Réseau Social ou Chacun est Indépendant
Newebe, un Réseau Social ou Chacun est IndépendantNewebe, un Réseau Social ou Chacun est Indépendant
Newebe, un Réseau Social ou Chacun est IndépendantFrank Rousseau
 
Conseils sur le Design pour les Développeurs par un Développeur
Conseils sur le Design pour les Développeurs par un DéveloppeurConseils sur le Design pour les Développeurs par un Développeur
Conseils sur le Design pour les Développeurs par un DéveloppeurFrank Rousseau
 
Développement web sans souffrance avec Cozy
Développement web sans souffrance avec CozyDéveloppement web sans souffrance avec Cozy
Développement web sans souffrance avec CozyFrank Rousseau
 
Newebe, a social network where all users are independent
Newebe, a social network where all users are independentNewebe, a social network where all users are independent
Newebe, a social network where all users are independentFrank Rousseau
 
Cozy Cloud, Pour un meilleur web
Cozy Cloud, Pour un meilleur webCozy Cloud, Pour un meilleur web
Cozy Cloud, Pour un meilleur webFrank Rousseau
 
Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...
Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...
Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...Frank Rousseau
 
20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdevFrank Rousseau
 
A startup with no office, hipster tools and open source products
A startup with no office, hipster tools and open source productsA startup with no office, hipster tools and open source products
A startup with no office, hipster tools and open source productsFrank Rousseau
 
How to make a Personal Single Page Application with Cozy
How to make a Personal Single Page Application with CozyHow to make a Personal Single Page Application with Cozy
How to make a Personal Single Page Application with CozyFrank Rousseau
 
How to quickly make REST APIs with CompoundJS
How to quickly make REST APIs with CompoundJSHow to quickly make REST APIs with CompoundJS
How to quickly make REST APIs with CompoundJSFrank Rousseau
 
Haibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy againHaibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy againFrank Rousseau
 
Cozy Cloud for RMLL 2012
Cozy Cloud for RMLL 2012Cozy Cloud for RMLL 2012
Cozy Cloud for RMLL 2012Frank Rousseau
 

More from Frank Rousseau (18)

Synchronisation de périphériques avec Javascript et PouchDB
Synchronisation de périphériques avec Javascript et PouchDBSynchronisation de périphériques avec Javascript et PouchDB
Synchronisation de périphériques avec Javascript et PouchDB
 
Device Synchronization with Javascript and PouchDB
Device Synchronization with Javascript and PouchDBDevice Synchronization with Javascript and PouchDB
Device Synchronization with Javascript and PouchDB
 
Newebe, un Réseau Social ou Chacun est Indépendant
Newebe, un Réseau Social ou Chacun est IndépendantNewebe, un Réseau Social ou Chacun est Indépendant
Newebe, un Réseau Social ou Chacun est Indépendant
 
Conseils sur le Design pour les Développeurs par un Développeur
Conseils sur le Design pour les Développeurs par un DéveloppeurConseils sur le Design pour les Développeurs par un Développeur
Conseils sur le Design pour les Développeurs par un Développeur
 
Développement web sans souffrance avec Cozy
Développement web sans souffrance avec CozyDéveloppement web sans souffrance avec Cozy
Développement web sans souffrance avec Cozy
 
Cozy, a Personal PaaS
Cozy, a Personal PaaSCozy, a Personal PaaS
Cozy, a Personal PaaS
 
Newebe, a social network where all users are independent
Newebe, a social network where all users are independentNewebe, a social network where all users are independent
Newebe, a social network where all users are independent
 
Cozy Cloud, Pour un meilleur web
Cozy Cloud, Pour un meilleur webCozy Cloud, Pour un meilleur web
Cozy Cloud, Pour un meilleur web
 
Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...
Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...
Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...
 
20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev
 
A startup with no office, hipster tools and open source products
A startup with no office, hipster tools and open source productsA startup with no office, hipster tools and open source products
A startup with no office, hipster tools and open source products
 
How to make a Personal Single Page Application with Cozy
How to make a Personal Single Page Application with CozyHow to make a Personal Single Page Application with Cozy
How to make a Personal Single Page Application with Cozy
 
How to quickly make REST APIs with CompoundJS
How to quickly make REST APIs with CompoundJSHow to quickly make REST APIs with CompoundJS
How to quickly make REST APIs with CompoundJS
 
Haibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy againHaibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy again
 
Cozy Cloud, JDLL 2012
Cozy Cloud, JDLL 2012Cozy Cloud, JDLL 2012
Cozy Cloud, JDLL 2012
 
Newebe, JDLL 2012
Newebe, JDLL 2012Newebe, JDLL 2012
Newebe, JDLL 2012
 
Newebe for RMLL 2012
Newebe for RMLL 2012Newebe for RMLL 2012
Newebe for RMLL 2012
 
Cozy Cloud for RMLL 2012
Cozy Cloud for RMLL 2012Cozy Cloud for RMLL 2012
Cozy Cloud for RMLL 2012
 

Recently uploaded

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Recently uploaded (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Node.js et NPM: de la récupération de dépendances à la publication de paquets

  • 1. Node.js et NPM De la gestion de dépendances à la publication de packages
  • 2. NodeJS - Environnement d'exécution asynchrone - Basé sur V8 - Permet d'utiliser Javascript côté serveur - Mais surtout ...
  • 4. NPM - Gestionnaire de paquets (Equivalent de pip en python ou gem en Ruby) - Registry (annuaire, moteur de recherche) - Basé sur un manifeste (package.json)
  • 5. { "name": "americano", "version": "0.1.0", "description": "Express simplifié !", "author": "Frank Rousseau <frank@cozycloud.cc>", "dependencies": { "colors": "0.x.x", "express": "3.3.x", "commander": "2.3.1", "printit": "0.2.x" }, "devDependencies": { "mocha": "0.5.x" }, "engine": "node >= 0.4.1" }
  • 7. { "name": "americano", "version": "0.1.0", "description": "Express simplifié !", "author": "Frank Rousseau <frank@cozycloud.cc>", "dependencies": { "colors": "0.x.x", "express": "3.3.x", "commander": "2.3.1", "printit": "0.2.x" },, "devDependencies": { "mocha": "0.5.x" }, "engine": "node >= 0.4.1" }
  • 8. { "name": "americano", "version": "0.1.0", "description": "Express simplifié !", "author": "Frank Rousseau <frank@cozycloud.cc>", "dependencies": { "colors": "0.x.x", "express": "3.3.x", "commander": "2.3.1", "printit": "0.2.x" }, "devDependencies": { "mocha": "0.5.x" }, "engine": "node >= 0.4.1" }
  • 9. npm install [--production] npm install --save colors npm install -g express Récupération
  • 10. # affiche l'arbre des # dépendances npm ls # affiche les dépendances # obsolètes npm outdated # Génère les dépendances # manquantes pakmanager deps
  • 12. Très populaires - ExpressJS/Sails/Americano (framework web) - Request/Request-json (requêtage simplifié) - Underscore/Lodash (utilitaires tableaux) - Commander/Optimist/Nopt (parsers d'arguments) - Jade (moteur de template) - Moment (date) - Stylus (pré-processeur CSS)
  • 13. Populaires - Cheerio (scraping) - Through (gestion de flux) - Glob (recherche de fichiers) - Rimraf/fs-extra (rm -rf, add-on file-system)  - Shelljs (Bash dans node) - Chalk (coloration sortie console)
  • 14.
  • 15. Build
  • 16.
  • 18. { "name": "americano", "version": "0.1.0", "description": "Express simplifié !", "author": "Frank Rousseau <frank@cozycloud.cc>", "dependencies": { "colors": "0.x.x", "express": "3.3.x", "commander": "2.3.1", "printit": "0.2.x" }, "devDependencies": { "mocha": "0.5.x" }, "engine": "node >= 0.4.1", "main": "./main.js", "scripts": { "prepublish": "cake build", "test": "cake tests" }, "bin": { "americano": "./bin/americano" } }
  • 19. { "name": "americano", "version": "0.1.0", "description": "Express simplifié !", "author": "Frank Rousseau <frank@cozycloud.cc>", "dependencies": { "colors": "0.x.x", "express": "3.3.x", "commander": "2.3.1", "printit": "0.2.x" }, "devDependencies": { "mocha": "0.5.x" }, "engine": "node >= 0.4.1", "main": "./main.js", "scripts": { "prepublish": "cake build", "test": "cake tests" <= $ npm test }, "bin": { "americano": "./bin/americano" } }
  • 20. { "name": "americano", "version": "0.1.0", "description": "Express simplifié !", "author": "Frank Rousseau <frank@cozycloud.cc>", "dependencies": { "colors": "0.x.x", "express": "3.3.x", "commander": "2.3.1", "printit": "0.2.x" }, "devDependencies": { "mocha": "0.5.x" }, "engine": "node >= 0.4.1", "main": "./main.js", "scripts": { "prepublish": "cake build", "test": "cake tests" }, "bin": { "americano": "./bin/americano" } }
  • 21. Outils de build - Grunt - Cake - Gulp - Broccoli
  • 22. Grunt - Gruntfile $ npm install -g grunt-cli $ npm install –-save-dev grunt@0.4.4 $ npm install –-save-dev grunt-contrib-coffee@0.10.0 $ grunt module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), coffee: { compile: { files: { './main.js': './main.coffee' }}}}); grunt.loadNpmTasks('grunt-contrib-coffee'); grunt.registerTask('default', ['coffee']); };
  • 23. Cake - Cakefile $ npm install -g coffee-script $ cake build task "build", "Compile coffee files to JS", -> console.log "Compile main file..." command = "coffee -c main.coffee" exec command, (err, stdout, stderr) -> if err console.log "Error: n #{err}" process.exit 1 else console.log "Compilation succeeded."
  • 24. Gulp - Gulpfile.js $ npm install -g grunt-cli $ npm install –-save-dev gulp@3.6.2 $ npm install –-save-dev gulp-coffee@1.4.3 $ gulp var gulp = require('gulp'); var coffee = require('gulp-coffee'); gulp.task('scripts', function() { return gulp.src(['./main.coffee']) .pipe(coffee()) .pipe(gulp.dest('./')); }); gulp.task('default', ['scripts']);
  • 25. Broccoli – Brocfile.js $ npm install -g broccoli $ npm install –-save-dev broccoli@0.12.0 $ npm install –-save-dev broccoli-coffee@0.1.0 $ brocoli build ./build var filterCoffeeScript = require('broccoli-coffee'); module.exports = filterCoffeeScript('src', {});
  • 27. npm set init.author.name "Votre nom" npm set init.author.email "vous@exemple.fr" npm set init.author.url "http://votresite.fr" npm adduser Enregistrement
  • 30.
  • 31. Apprenez Node.js avec Cozy !  http://cozy.io/hack/getting-started/ @mycozycloud cozy.io